diff options
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_sync.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c index 687e9fc582ca..6b6b39416ad3 100644 --- a/fs/xfs/linux-2.6/xfs_sync.c +++ b/fs/xfs/linux-2.6/xfs_sync.c | |||
@@ -613,7 +613,8 @@ xfssyncd( | |||
613 | set_freezable(); | 613 | set_freezable(); |
614 | timeleft = xfs_syncd_centisecs * msecs_to_jiffies(10); | 614 | timeleft = xfs_syncd_centisecs * msecs_to_jiffies(10); |
615 | for (;;) { | 615 | for (;;) { |
616 | timeleft = schedule_timeout_interruptible(timeleft); | 616 | if (list_empty(&mp->m_sync_list)) |
617 | timeleft = schedule_timeout_interruptible(timeleft); | ||
617 | /* swsusp */ | 618 | /* swsusp */ |
618 | try_to_freeze(); | 619 | try_to_freeze(); |
619 | if (kthread_should_stop() && list_empty(&mp->m_sync_list)) | 620 | if (kthread_should_stop() && list_empty(&mp->m_sync_list)) |
@@ -633,8 +634,7 @@ xfssyncd( | |||
633 | list_add_tail(&mp->m_sync_work.w_list, | 634 | list_add_tail(&mp->m_sync_work.w_list, |
634 | &mp->m_sync_list); | 635 | &mp->m_sync_list); |
635 | } | 636 | } |
636 | list_for_each_entry_safe(work, n, &mp->m_sync_list, w_list) | 637 | list_splice_init(&mp->m_sync_list, &tmp); |
637 | list_move(&work->w_list, &tmp); | ||
638 | spin_unlock(&mp->m_sync_lock); | 638 | spin_unlock(&mp->m_sync_lock); |
639 | 639 | ||
640 | list_for_each_entry_safe(work, n, &tmp, w_list) { | 640 | list_for_each_entry_safe(work, n, &tmp, w_list) { |