]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
Merge branch 'freezer'
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 28 Jun 2013 11:00:53 +0000 (13:00 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 28 Jun 2013 11:00:53 +0000 (13:00 +0200)
* freezer:
  af_unix: use freezable blocking calls in read
  sigtimedwait: use freezable blocking call
  nanosleep: use freezable blocking call
  futex: use freezable blocking call
  select: use freezable blocking call
  epoll: use freezable blocking call
  binder: use freezable blocking calls
  freezer: add new freezable helpers using freezer_do_not_count()
  freezer: convert freezable helpers to static inline where possible
  freezer: convert freezable helpers to freezer_do_not_count()
  freezer: skip waking up tasks with PF_FREEZER_SKIP set
  freezer: shorten freezer sleep time using exponential backoff
  lockdep: check that no locks held at freeze time
  lockdep: remove task argument from debug_check_no_locks_held
  freezer: add unsafe versions of freezable helpers for CIFS
  freezer: add unsafe versions of freezable helpers for NFS

1  2 
fs/nfs/nfs4proc.c
kernel/exit.c
net/sunrpc/sched.c

diff --combined fs/nfs/nfs4proc.c
index d7ba5616989c49fe52d396d41187a663744598f1,9b18af16781503f01baedb70d2ec4d00d0dfbef7..28241a42f363581341b3ed81de137fc0da1b428e
@@@ -268,7 -268,7 +268,7 @@@ static int nfs4_delay(struct rpc_clnt *
                *timeout = NFS4_POLL_RETRY_MIN;
        if (*timeout > NFS4_POLL_RETRY_MAX)
                *timeout = NFS4_POLL_RETRY_MAX;
-       freezable_schedule_timeout_killable(*timeout);
+       freezable_schedule_timeout_killable_unsafe(*timeout);
        if (fatal_signal_pending(current))
                res = -ERESTARTSYS;
        *timeout <<= 1;
@@@ -572,7 -572,7 +572,7 @@@ int nfs41_setup_sequence(struct nfs4_se
        task->tk_timeout = 0;
  
        spin_lock(&tbl->slot_tbl_lock);
 -      if (test_bit(NFS4_SESSION_DRAINING, &session->session_state) &&
 +      if (test_bit(NFS4_SLOT_TBL_DRAINING, &tbl->slot_tbl_state) &&
            !args->sa_privileged) {
                /* The state manager will wait until the slot table is empty */
                dprintk("%s session is draining\n", __func__);
@@@ -1078,7 -1078,7 +1078,7 @@@ static struct nfs4_state *nfs4_try_open
        struct nfs4_state *state = opendata->state;
        struct nfs_inode *nfsi = NFS_I(state->inode);
        struct nfs_delegation *delegation;
 -      int open_mode = opendata->o_arg.open_flags & (O_EXCL|O_TRUNC);
 +      int open_mode = opendata->o_arg.open_flags;
        fmode_t fmode = opendata->o_arg.fmode;
        nfs4_stateid stateid;
        int ret = -EAGAIN;
@@@ -4528,7 -4528,7 +4528,7 @@@ int nfs4_proc_delegreturn(struct inode 
  static unsigned long
  nfs4_set_lock_task_retry(unsigned long timeout)
  {
-       freezable_schedule_timeout_killable(timeout);
+       freezable_schedule_timeout_killable_unsafe(timeout);
        timeout <<= 1;
        if (timeout > NFS4_LOCK_MAXTIMEOUT)
                return NFS4_LOCK_MAXTIMEOUT;
diff --combined kernel/exit.c
index 7bb73f9d09dbeedcc6c07f6a8dc8257f76fc4963,e597562750003ca1fbb7a045527758507556c683..6a057750ebbbdee49b9c2c2b578567401fd8540f
@@@ -649,6 -649,7 +649,6 @@@ static void exit_notify(struct task_str
         *      jobs, send them a SIGHUP and then a SIGCONT.  (POSIX 3.2.2.2)
         */
        forget_original_parent(tsk);
 -      exit_task_namespaces(tsk);
  
        write_lock_irq(&tasklist_lock);
        if (group_dead)
@@@ -794,7 -795,6 +794,7 @@@ void do_exit(long code
        exit_shm(tsk);
        exit_files(tsk);
        exit_fs(tsk);
 +      exit_task_namespaces(tsk);
        exit_task_work(tsk);
        check_stack_usage();
        exit_thread();
        /*
         * Make sure we are holding no locks:
         */
-       debug_check_no_locks_held(tsk);
+       debug_check_no_locks_held();
        /*
         * We can do this unlocked here. The futex code uses this flag
         * just to verify whether the pi state cleanup has been done
diff --combined net/sunrpc/sched.c
index 5356b120dbf8e2fe61ba88081d1fab1941f135a9,8dcfadcef5d3d217c6ce29014dad3a318584633d..77d251e0259315eeef4acd4de50def4382bba5e1
@@@ -254,7 -254,7 +254,7 @@@ static int rpc_wait_bit_killable(void *
  {
        if (fatal_signal_pending(current))
                return -ERESTARTSYS;
-       freezable_schedule();
+       freezable_schedule_unsafe();
        return 0;
  }
  
@@@ -324,17 -324,11 +324,17 @@@ EXPORT_SYMBOL_GPL(__rpc_wait_for_comple
   * Note: If the task is ASYNC, and is being made runnable after sitting on an
   * rpc_wait_queue, this must be called with the queue spinlock held to protect
   * the wait queue operation.
 + * Note the ordering of rpc_test_and_set_running() and rpc_clear_queued(),
 + * which is needed to ensure that __rpc_execute() doesn't loop (due to the
 + * lockless RPC_IS_QUEUED() test) before we've had a chance to test
 + * the RPC_TASK_RUNNING flag.
   */
  static void rpc_make_runnable(struct rpc_task *task)
  {
 +      bool need_wakeup = !rpc_test_and_set_running(task);
 +
        rpc_clear_queued(task);
 -      if (rpc_test_and_set_running(task))
 +      if (!need_wakeup)
                return;
        if (RPC_IS_ASYNC(task)) {
                INIT_WORK(&task->u.tk_work, rpc_async_schedule);