diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_sync.c')
| -rw-r--r-- | fs/xfs/linux-2.6/xfs_sync.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c index a9f6d20aff41..05cd85317f6f 100644 --- a/fs/xfs/linux-2.6/xfs_sync.c +++ b/fs/xfs/linux-2.6/xfs_sync.c | |||
| @@ -607,7 +607,8 @@ xfssyncd( | |||
| 607 | set_freezable(); | 607 | set_freezable(); |
| 608 | timeleft = xfs_syncd_centisecs * msecs_to_jiffies(10); | 608 | timeleft = xfs_syncd_centisecs * msecs_to_jiffies(10); |
| 609 | for (;;) { | 609 | for (;;) { |
| 610 | timeleft = schedule_timeout_interruptible(timeleft); | 610 | if (list_empty(&mp->m_sync_list)) |
| 611 | timeleft = schedule_timeout_interruptible(timeleft); | ||
| 611 | /* swsusp */ | 612 | /* swsusp */ |
| 612 | try_to_freeze(); | 613 | try_to_freeze(); |
| 613 | if (kthread_should_stop() && list_empty(&mp->m_sync_list)) | 614 | if (kthread_should_stop() && list_empty(&mp->m_sync_list)) |
| @@ -627,8 +628,7 @@ xfssyncd( | |||
| 627 | list_add_tail(&mp->m_sync_work.w_list, | 628 | list_add_tail(&mp->m_sync_work.w_list, |
| 628 | &mp->m_sync_list); | 629 | &mp->m_sync_list); |
| 629 | } | 630 | } |
| 630 | list_for_each_entry_safe(work, n, &mp->m_sync_list, w_list) | 631 | list_splice_init(&mp->m_sync_list, &tmp); |
| 631 | list_move(&work->w_list, &tmp); | ||
| 632 | spin_unlock(&mp->m_sync_lock); | 632 | spin_unlock(&mp->m_sync_lock); |
| 633 | 633 | ||
| 634 | list_for_each_entry_safe(work, n, &tmp, w_list) { | 634 | list_for_each_entry_safe(work, n, &tmp, w_list) { |
| @@ -688,12 +688,12 @@ xfs_inode_set_reclaim_tag( | |||
| 688 | struct xfs_perag *pag; | 688 | struct xfs_perag *pag; |
| 689 | 689 | ||
| 690 | pag = xfs_perag_get(mp, XFS_INO_TO_AGNO(mp, ip->i_ino)); | 690 | pag = xfs_perag_get(mp, XFS_INO_TO_AGNO(mp, ip->i_ino)); |
| 691 | read_lock(&pag->pag_ici_lock); | 691 | write_lock(&pag->pag_ici_lock); |
| 692 | spin_lock(&ip->i_flags_lock); | 692 | spin_lock(&ip->i_flags_lock); |
| 693 | __xfs_inode_set_reclaim_tag(pag, ip); | 693 | __xfs_inode_set_reclaim_tag(pag, ip); |
| 694 | __xfs_iflags_set(ip, XFS_IRECLAIMABLE); | 694 | __xfs_iflags_set(ip, XFS_IRECLAIMABLE); |
| 695 | spin_unlock(&ip->i_flags_lock); | 695 | spin_unlock(&ip->i_flags_lock); |
| 696 | read_unlock(&pag->pag_ici_lock); | 696 | write_unlock(&pag->pag_ici_lock); |
| 697 | xfs_perag_put(pag); | 697 | xfs_perag_put(pag); |
| 698 | } | 698 | } |
| 699 | 699 | ||
