diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_sync.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_sync.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c index 961df0a22c78..d895a3a960f5 100644 --- a/fs/xfs/linux-2.6/xfs_sync.c +++ b/fs/xfs/linux-2.6/xfs_sync.c | |||
@@ -663,10 +663,9 @@ xfs_syncd_stop( | |||
663 | kthread_stop(mp->m_sync_task); | 663 | kthread_stop(mp->m_sync_task); |
664 | } | 664 | } |
665 | 665 | ||
666 | int | 666 | STATIC int |
667 | xfs_reclaim_inode( | 667 | xfs_reclaim_inode( |
668 | xfs_inode_t *ip, | 668 | xfs_inode_t *ip, |
669 | int locked, | ||
670 | int sync_mode) | 669 | int sync_mode) |
671 | { | 670 | { |
672 | xfs_perag_t *pag = xfs_get_perag(ip->i_mount, ip->i_ino); | 671 | xfs_perag_t *pag = xfs_get_perag(ip->i_mount, ip->i_ino); |
@@ -682,10 +681,6 @@ xfs_reclaim_inode( | |||
682 | !__xfs_iflags_test(ip, XFS_IRECLAIMABLE)) { | 681 | !__xfs_iflags_test(ip, XFS_IRECLAIMABLE)) { |
683 | spin_unlock(&ip->i_flags_lock); | 682 | spin_unlock(&ip->i_flags_lock); |
684 | write_unlock(&pag->pag_ici_lock); | 683 | write_unlock(&pag->pag_ici_lock); |
685 | if (locked) { | ||
686 | xfs_ifunlock(ip); | ||
687 | xfs_iunlock(ip, XFS_ILOCK_EXCL); | ||
688 | } | ||
689 | return -EAGAIN; | 684 | return -EAGAIN; |
690 | } | 685 | } |
691 | __xfs_iflags_set(ip, XFS_IRECLAIM); | 686 | __xfs_iflags_set(ip, XFS_IRECLAIM); |
@@ -704,10 +699,8 @@ xfs_reclaim_inode( | |||
704 | * We get the flush lock regardless, though, just to make sure | 699 | * We get the flush lock regardless, though, just to make sure |
705 | * we don't free it while it is being flushed. | 700 | * we don't free it while it is being flushed. |
706 | */ | 701 | */ |
707 | if (!locked) { | 702 | xfs_ilock(ip, XFS_ILOCK_EXCL); |
708 | xfs_ilock(ip, XFS_ILOCK_EXCL); | 703 | xfs_iflock(ip); |
709 | xfs_iflock(ip); | ||
710 | } | ||
711 | 704 | ||
712 | /* | 705 | /* |
713 | * In the case of a forced shutdown we rely on xfs_iflush() to | 706 | * In the case of a forced shutdown we rely on xfs_iflush() to |
@@ -778,7 +771,7 @@ xfs_reclaim_inode_now( | |||
778 | } | 771 | } |
779 | read_unlock(&pag->pag_ici_lock); | 772 | read_unlock(&pag->pag_ici_lock); |
780 | 773 | ||
781 | return xfs_reclaim_inode(ip, 0, flags); | 774 | return xfs_reclaim_inode(ip, flags); |
782 | } | 775 | } |
783 | 776 | ||
784 | int | 777 | int |