aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_trans_ail.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_trans_ail.c')
-rw-r--r--fs/xfs/xfs_trans_ail.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c
index 4f18fd92ca13..d6c9c3e9e02b 100644
--- a/fs/xfs/xfs_trans_ail.c
+++ b/fs/xfs/xfs_trans_ail.c
@@ -497,6 +497,7 @@ xfsaild(
497 long tout = 0; /* milliseconds */ 497 long tout = 0; /* milliseconds */
498 498
499 current->flags |= PF_MEMALLOC; 499 current->flags |= PF_MEMALLOC;
500 set_freezable();
500 501
501 while (!kthread_should_stop()) { 502 while (!kthread_should_stop()) {
502 if (tout && tout <= 20) 503 if (tout && tout <= 20)
@@ -519,14 +520,14 @@ xfsaild(
519 if (!xfs_ail_min(ailp) && 520 if (!xfs_ail_min(ailp) &&
520 ailp->xa_target == ailp->xa_target_prev) { 521 ailp->xa_target == ailp->xa_target_prev) {
521 spin_unlock(&ailp->xa_lock); 522 spin_unlock(&ailp->xa_lock);
522 schedule(); 523 freezable_schedule();
523 tout = 0; 524 tout = 0;
524 continue; 525 continue;
525 } 526 }
526 spin_unlock(&ailp->xa_lock); 527 spin_unlock(&ailp->xa_lock);
527 528
528 if (tout) 529 if (tout)
529 schedule_timeout(msecs_to_jiffies(tout)); 530 freezable_schedule_timeout(msecs_to_jiffies(tout));
530 531
531 __set_current_state(TASK_RUNNING); 532 __set_current_state(TASK_RUNNING);
532 533