diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/btrfs/async-thread.c | 2 | ||||
| -rw-r--r-- | fs/btrfs/disk-io.c | 8 | ||||
| -rw-r--r-- | fs/ext4/super.c | 3 | ||||
| -rw-r--r-- | fs/fs-writeback.c | 4 | ||||
| -rw-r--r-- | fs/gfs2/log.c | 4 | ||||
| -rw-r--r-- | fs/gfs2/quota.c | 4 | ||||
| -rw-r--r-- | fs/jbd/journal.c | 2 | ||||
| -rw-r--r-- | fs/jbd2/journal.c | 2 | ||||
| -rw-r--r-- | fs/jfs/jfs_logmgr.c | 2 | ||||
| -rw-r--r-- | fs/jfs/jfs_txnmgr.c | 4 | ||||
| -rw-r--r-- | fs/nfs/inode.c | 3 | ||||
| -rw-r--r-- | fs/nfs/nfs3proc.c | 3 | ||||
| -rw-r--r-- | fs/nfs/nfs4proc.c | 5 | ||||
| -rw-r--r-- | fs/nfs/proc.c | 3 | ||||
| -rw-r--r-- | fs/nilfs2/segment.c | 2 | ||||
| -rw-r--r-- | fs/xfs/xfs_buf.c | 2 |
16 files changed, 25 insertions, 28 deletions
diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c index 0b394580d860..0cc20b35c1c4 100644 --- a/fs/btrfs/async-thread.c +++ b/fs/btrfs/async-thread.c | |||
| @@ -334,7 +334,7 @@ again: | |||
| 334 | if (freezing(current)) { | 334 | if (freezing(current)) { |
| 335 | worker->working = 0; | 335 | worker->working = 0; |
| 336 | spin_unlock_irq(&worker->lock); | 336 | spin_unlock_irq(&worker->lock); |
| 337 | refrigerator(); | 337 | try_to_freeze(); |
| 338 | } else { | 338 | } else { |
| 339 | spin_unlock_irq(&worker->lock); | 339 | spin_unlock_irq(&worker->lock); |
| 340 | if (!kthread_should_stop()) { | 340 | if (!kthread_should_stop()) { |
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index f44b3928dc2d..f99a099a7747 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
| @@ -1579,9 +1579,7 @@ static int cleaner_kthread(void *arg) | |||
| 1579 | btrfs_run_defrag_inodes(root->fs_info); | 1579 | btrfs_run_defrag_inodes(root->fs_info); |
| 1580 | } | 1580 | } |
| 1581 | 1581 | ||
| 1582 | if (freezing(current)) { | 1582 | if (!try_to_freeze()) { |
| 1583 | refrigerator(); | ||
| 1584 | } else { | ||
| 1585 | set_current_state(TASK_INTERRUPTIBLE); | 1583 | set_current_state(TASK_INTERRUPTIBLE); |
| 1586 | if (!kthread_should_stop()) | 1584 | if (!kthread_should_stop()) |
| 1587 | schedule(); | 1585 | schedule(); |
| @@ -1635,9 +1633,7 @@ sleep: | |||
| 1635 | wake_up_process(root->fs_info->cleaner_kthread); | 1633 | wake_up_process(root->fs_info->cleaner_kthread); |
| 1636 | mutex_unlock(&root->fs_info->transaction_kthread_mutex); | 1634 | mutex_unlock(&root->fs_info->transaction_kthread_mutex); |
| 1637 | 1635 | ||
| 1638 | if (freezing(current)) { | 1636 | if (!try_to_freeze()) { |
| 1639 | refrigerator(); | ||
| 1640 | } else { | ||
| 1641 | set_current_state(TASK_INTERRUPTIBLE); | 1637 | set_current_state(TASK_INTERRUPTIBLE); |
| 1642 | if (!kthread_should_stop() && | 1638 | if (!kthread_should_stop() && |
| 1643 | !btrfs_transaction_blocked(root->fs_info)) | 1639 | !btrfs_transaction_blocked(root->fs_info)) |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 6733b3736b3b..64e2529ae9bb 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
| @@ -2882,8 +2882,7 @@ cont_thread: | |||
| 2882 | } | 2882 | } |
| 2883 | mutex_unlock(&eli->li_list_mtx); | 2883 | mutex_unlock(&eli->li_list_mtx); |
| 2884 | 2884 | ||
| 2885 | if (freezing(current)) | 2885 | try_to_freeze(); |
| 2886 | refrigerator(); | ||
| 2887 | 2886 | ||
| 2888 | cur = jiffies; | 2887 | cur = jiffies; |
| 2889 | if ((time_after_eq(cur, next_wakeup)) || | 2888 | if ((time_after_eq(cur, next_wakeup)) || |
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 80a4574028f1..e2951506434d 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c | |||
| @@ -936,7 +936,7 @@ int bdi_writeback_thread(void *data) | |||
| 936 | 936 | ||
| 937 | trace_writeback_thread_start(bdi); | 937 | trace_writeback_thread_start(bdi); |
| 938 | 938 | ||
| 939 | while (!kthread_should_stop()) { | 939 | while (!kthread_freezable_should_stop(NULL)) { |
| 940 | /* | 940 | /* |
| 941 | * Remove own delayed wake-up timer, since we are already awake | 941 | * Remove own delayed wake-up timer, since we are already awake |
| 942 | * and we'll take care of the preriodic write-back. | 942 | * and we'll take care of the preriodic write-back. |
| @@ -966,8 +966,6 @@ int bdi_writeback_thread(void *data) | |||
| 966 | */ | 966 | */ |
| 967 | schedule(); | 967 | schedule(); |
| 968 | } | 968 | } |
| 969 | |||
| 970 | try_to_freeze(); | ||
| 971 | } | 969 | } |
| 972 | 970 | ||
| 973 | /* Flush any work that raced with us exiting */ | 971 | /* Flush any work that raced with us exiting */ |
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index 2731e657cf7f..756fae9eaf8f 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c | |||
| @@ -951,8 +951,8 @@ int gfs2_logd(void *data) | |||
| 951 | wake_up(&sdp->sd_log_waitq); | 951 | wake_up(&sdp->sd_log_waitq); |
| 952 | 952 | ||
| 953 | t = gfs2_tune_get(sdp, gt_logd_secs) * HZ; | 953 | t = gfs2_tune_get(sdp, gt_logd_secs) * HZ; |
| 954 | if (freezing(current)) | 954 | |
| 955 | refrigerator(); | 955 | try_to_freeze(); |
| 956 | 956 | ||
| 957 | do { | 957 | do { |
| 958 | prepare_to_wait(&sdp->sd_logd_waitq, &wait, | 958 | prepare_to_wait(&sdp->sd_logd_waitq, &wait, |
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 98a01db1f6dc..a45b21b03915 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c | |||
| @@ -1417,8 +1417,8 @@ int gfs2_quotad(void *data) | |||
| 1417 | /* Check for & recover partially truncated inodes */ | 1417 | /* Check for & recover partially truncated inodes */ |
| 1418 | quotad_check_trunc_list(sdp); | 1418 | quotad_check_trunc_list(sdp); |
| 1419 | 1419 | ||
| 1420 | if (freezing(current)) | 1420 | try_to_freeze(); |
| 1421 | refrigerator(); | 1421 | |
| 1422 | t = min(quotad_timeo, statfs_timeo); | 1422 | t = min(quotad_timeo, statfs_timeo); |
| 1423 | 1423 | ||
| 1424 | prepare_to_wait(&sdp->sd_quota_wait, &wait, TASK_INTERRUPTIBLE); | 1424 | prepare_to_wait(&sdp->sd_quota_wait, &wait, TASK_INTERRUPTIBLE); |
diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c index fea8dd661d2b..a96cff0c5f1d 100644 --- a/fs/jbd/journal.c +++ b/fs/jbd/journal.c | |||
| @@ -166,7 +166,7 @@ loop: | |||
| 166 | */ | 166 | */ |
| 167 | jbd_debug(1, "Now suspending kjournald\n"); | 167 | jbd_debug(1, "Now suspending kjournald\n"); |
| 168 | spin_unlock(&journal->j_state_lock); | 168 | spin_unlock(&journal->j_state_lock); |
| 169 | refrigerator(); | 169 | try_to_freeze(); |
| 170 | spin_lock(&journal->j_state_lock); | 170 | spin_lock(&journal->j_state_lock); |
| 171 | } else { | 171 | } else { |
| 172 | /* | 172 | /* |
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 0fa0123151d3..c0a5f9f1b127 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c | |||
| @@ -173,7 +173,7 @@ loop: | |||
| 173 | */ | 173 | */ |
| 174 | jbd_debug(1, "Now suspending kjournald2\n"); | 174 | jbd_debug(1, "Now suspending kjournald2\n"); |
| 175 | write_unlock(&journal->j_state_lock); | 175 | write_unlock(&journal->j_state_lock); |
| 176 | refrigerator(); | 176 | try_to_freeze(); |
| 177 | write_lock(&journal->j_state_lock); | 177 | write_lock(&journal->j_state_lock); |
| 178 | } else { | 178 | } else { |
| 179 | /* | 179 | /* |
diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index cc5f811ed383..2eb952c41a69 100644 --- a/fs/jfs/jfs_logmgr.c +++ b/fs/jfs/jfs_logmgr.c | |||
| @@ -2349,7 +2349,7 @@ int jfsIOWait(void *arg) | |||
| 2349 | 2349 | ||
| 2350 | if (freezing(current)) { | 2350 | if (freezing(current)) { |
| 2351 | spin_unlock_irq(&log_redrive_lock); | 2351 | spin_unlock_irq(&log_redrive_lock); |
| 2352 | refrigerator(); | 2352 | try_to_freeze(); |
| 2353 | } else { | 2353 | } else { |
| 2354 | set_current_state(TASK_INTERRUPTIBLE); | 2354 | set_current_state(TASK_INTERRUPTIBLE); |
| 2355 | spin_unlock_irq(&log_redrive_lock); | 2355 | spin_unlock_irq(&log_redrive_lock); |
diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c index af9606057dde..bb8b661bcc50 100644 --- a/fs/jfs/jfs_txnmgr.c +++ b/fs/jfs/jfs_txnmgr.c | |||
| @@ -2800,7 +2800,7 @@ int jfs_lazycommit(void *arg) | |||
| 2800 | 2800 | ||
| 2801 | if (freezing(current)) { | 2801 | if (freezing(current)) { |
| 2802 | LAZY_UNLOCK(flags); | 2802 | LAZY_UNLOCK(flags); |
| 2803 | refrigerator(); | 2803 | try_to_freeze(); |
| 2804 | } else { | 2804 | } else { |
| 2805 | DECLARE_WAITQUEUE(wq, current); | 2805 | DECLARE_WAITQUEUE(wq, current); |
| 2806 | 2806 | ||
| @@ -2994,7 +2994,7 @@ int jfs_sync(void *arg) | |||
| 2994 | 2994 | ||
| 2995 | if (freezing(current)) { | 2995 | if (freezing(current)) { |
| 2996 | TXN_UNLOCK(); | 2996 | TXN_UNLOCK(); |
| 2997 | refrigerator(); | 2997 | try_to_freeze(); |
| 2998 | } else { | 2998 | } else { |
| 2999 | set_current_state(TASK_INTERRUPTIBLE); | 2999 | set_current_state(TASK_INTERRUPTIBLE); |
| 3000 | TXN_UNLOCK(); | 3000 | TXN_UNLOCK(); |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 6f00086e340f..81db25e92e10 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | #include <linux/nfs_xdr.h> | 38 | #include <linux/nfs_xdr.h> |
| 39 | #include <linux/slab.h> | 39 | #include <linux/slab.h> |
| 40 | #include <linux/compat.h> | 40 | #include <linux/compat.h> |
| 41 | #include <linux/freezer.h> | ||
| 41 | 42 | ||
| 42 | #include <asm/system.h> | 43 | #include <asm/system.h> |
| 43 | #include <asm/uaccess.h> | 44 | #include <asm/uaccess.h> |
| @@ -77,7 +78,7 @@ int nfs_wait_bit_killable(void *word) | |||
| 77 | { | 78 | { |
| 78 | if (fatal_signal_pending(current)) | 79 | if (fatal_signal_pending(current)) |
| 79 | return -ERESTARTSYS; | 80 | return -ERESTARTSYS; |
| 80 | schedule(); | 81 | freezable_schedule(); |
| 81 | return 0; | 82 | return 0; |
| 82 | } | 83 | } |
| 83 | 84 | ||
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index d4bc9ed91748..91943953a370 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <linux/nfs_page.h> | 17 | #include <linux/nfs_page.h> |
| 18 | #include <linux/lockd/bind.h> | 18 | #include <linux/lockd/bind.h> |
| 19 | #include <linux/nfs_mount.h> | 19 | #include <linux/nfs_mount.h> |
| 20 | #include <linux/freezer.h> | ||
| 20 | 21 | ||
| 21 | #include "iostat.h" | 22 | #include "iostat.h" |
| 22 | #include "internal.h" | 23 | #include "internal.h" |
| @@ -32,7 +33,7 @@ nfs3_rpc_wrapper(struct rpc_clnt *clnt, struct rpc_message *msg, int flags) | |||
| 32 | res = rpc_call_sync(clnt, msg, flags); | 33 | res = rpc_call_sync(clnt, msg, flags); |
| 33 | if (res != -EJUKEBOX && res != -EKEYEXPIRED) | 34 | if (res != -EJUKEBOX && res != -EKEYEXPIRED) |
| 34 | break; | 35 | break; |
| 35 | schedule_timeout_killable(NFS_JUKEBOX_RETRY_TIME); | 36 | freezable_schedule_timeout_killable(NFS_JUKEBOX_RETRY_TIME); |
| 36 | res = -ERESTARTSYS; | 37 | res = -ERESTARTSYS; |
| 37 | } while (!fatal_signal_pending(current)); | 38 | } while (!fatal_signal_pending(current)); |
| 38 | return res; | 39 | return res; |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index d9f4d78c3413..dcda0ba7af60 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
| @@ -55,6 +55,7 @@ | |||
| 55 | #include <linux/sunrpc/bc_xprt.h> | 55 | #include <linux/sunrpc/bc_xprt.h> |
| 56 | #include <linux/xattr.h> | 56 | #include <linux/xattr.h> |
| 57 | #include <linux/utsname.h> | 57 | #include <linux/utsname.h> |
| 58 | #include <linux/freezer.h> | ||
| 58 | 59 | ||
| 59 | #include "nfs4_fs.h" | 60 | #include "nfs4_fs.h" |
| 60 | #include "delegation.h" | 61 | #include "delegation.h" |
| @@ -243,7 +244,7 @@ static int nfs4_delay(struct rpc_clnt *clnt, long *timeout) | |||
| 243 | *timeout = NFS4_POLL_RETRY_MIN; | 244 | *timeout = NFS4_POLL_RETRY_MIN; |
| 244 | if (*timeout > NFS4_POLL_RETRY_MAX) | 245 | if (*timeout > NFS4_POLL_RETRY_MAX) |
| 245 | *timeout = NFS4_POLL_RETRY_MAX; | 246 | *timeout = NFS4_POLL_RETRY_MAX; |
| 246 | schedule_timeout_killable(*timeout); | 247 | freezable_schedule_timeout_killable(*timeout); |
| 247 | if (fatal_signal_pending(current)) | 248 | if (fatal_signal_pending(current)) |
| 248 | res = -ERESTARTSYS; | 249 | res = -ERESTARTSYS; |
| 249 | *timeout <<= 1; | 250 | *timeout <<= 1; |
| @@ -3958,7 +3959,7 @@ int nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, const nfs4 | |||
| 3958 | static unsigned long | 3959 | static unsigned long |
| 3959 | nfs4_set_lock_task_retry(unsigned long timeout) | 3960 | nfs4_set_lock_task_retry(unsigned long timeout) |
| 3960 | { | 3961 | { |
| 3961 | schedule_timeout_killable(timeout); | 3962 | freezable_schedule_timeout_killable(timeout); |
| 3962 | timeout <<= 1; | 3963 | timeout <<= 1; |
| 3963 | if (timeout > NFS4_LOCK_MAXTIMEOUT) | 3964 | if (timeout > NFS4_LOCK_MAXTIMEOUT) |
| 3964 | return NFS4_LOCK_MAXTIMEOUT; | 3965 | return NFS4_LOCK_MAXTIMEOUT; |
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c index f48125da198a..0c672588fe5a 100644 --- a/fs/nfs/proc.c +++ b/fs/nfs/proc.c | |||
| @@ -41,6 +41,7 @@ | |||
| 41 | #include <linux/nfs_fs.h> | 41 | #include <linux/nfs_fs.h> |
| 42 | #include <linux/nfs_page.h> | 42 | #include <linux/nfs_page.h> |
| 43 | #include <linux/lockd/bind.h> | 43 | #include <linux/lockd/bind.h> |
| 44 | #include <linux/freezer.h> | ||
| 44 | #include "internal.h" | 45 | #include "internal.h" |
| 45 | 46 | ||
| 46 | #define NFSDBG_FACILITY NFSDBG_PROC | 47 | #define NFSDBG_FACILITY NFSDBG_PROC |
| @@ -59,7 +60,7 @@ nfs_rpc_wrapper(struct rpc_clnt *clnt, struct rpc_message *msg, int flags) | |||
| 59 | res = rpc_call_sync(clnt, msg, flags); | 60 | res = rpc_call_sync(clnt, msg, flags); |
| 60 | if (res != -EKEYEXPIRED) | 61 | if (res != -EKEYEXPIRED) |
| 61 | break; | 62 | break; |
| 62 | schedule_timeout_killable(NFS_JUKEBOX_RETRY_TIME); | 63 | freezable_schedule_timeout_killable(NFS_JUKEBOX_RETRY_TIME); |
| 63 | res = -ERESTARTSYS; | 64 | res = -ERESTARTSYS; |
| 64 | } while (!fatal_signal_pending(current)); | 65 | } while (!fatal_signal_pending(current)); |
| 65 | return res; | 66 | return res; |
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index bb24ab6c282f..0e72ad6f22aa 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c | |||
| @@ -2470,7 +2470,7 @@ static int nilfs_segctor_thread(void *arg) | |||
| 2470 | 2470 | ||
| 2471 | if (freezing(current)) { | 2471 | if (freezing(current)) { |
| 2472 | spin_unlock(&sci->sc_state_lock); | 2472 | spin_unlock(&sci->sc_state_lock); |
| 2473 | refrigerator(); | 2473 | try_to_freeze(); |
| 2474 | spin_lock(&sci->sc_state_lock); | 2474 | spin_lock(&sci->sc_state_lock); |
| 2475 | } else { | 2475 | } else { |
| 2476 | DEFINE_WAIT(wait); | 2476 | DEFINE_WAIT(wait); |
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 2277bcae395f..ce6249dae90c 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c | |||
| @@ -1702,7 +1702,7 @@ xfsbufd( | |||
| 1702 | struct blk_plug plug; | 1702 | struct blk_plug plug; |
| 1703 | 1703 | ||
| 1704 | if (unlikely(freezing(current))) | 1704 | if (unlikely(freezing(current))) |
| 1705 | refrigerator(); | 1705 | try_to_freeze(); |
| 1706 | 1706 | ||
| 1707 | /* sleep for a long time if there is nothing to do. */ | 1707 | /* sleep for a long time if there is nothing to do. */ |
| 1708 | if (list_empty(&target->bt_delwri_queue)) | 1708 | if (list_empty(&target->bt_delwri_queue)) |
