diff options
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index bde4a1ad90f2..15bc01b2d6a0 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -3876,7 +3876,7 @@ xfs_finish_reclaim( | |||
3876 | int locked, | 3876 | int locked, |
3877 | int sync_mode) | 3877 | int sync_mode) |
3878 | { | 3878 | { |
3879 | xfs_ihash_t *ih = ip->i_hash; | 3879 | xfs_perag_t *pag = xfs_get_perag(ip->i_mount, ip->i_ino); |
3880 | bhv_vnode_t *vp = XFS_ITOV_NULL(ip); | 3880 | bhv_vnode_t *vp = XFS_ITOV_NULL(ip); |
3881 | int error; | 3881 | int error; |
3882 | 3882 | ||
@@ -3888,12 +3888,12 @@ xfs_finish_reclaim( | |||
3888 | * Once we have the XFS_IRECLAIM flag set it will not touch | 3888 | * Once we have the XFS_IRECLAIM flag set it will not touch |
3889 | * us. | 3889 | * us. |
3890 | */ | 3890 | */ |
3891 | write_lock(&ih->ih_lock); | 3891 | write_lock(&pag->pag_ici_lock); |
3892 | spin_lock(&ip->i_flags_lock); | 3892 | spin_lock(&ip->i_flags_lock); |
3893 | if (__xfs_iflags_test(ip, XFS_IRECLAIM) || | 3893 | if (__xfs_iflags_test(ip, XFS_IRECLAIM) || |
3894 | (!__xfs_iflags_test(ip, XFS_IRECLAIMABLE) && vp == NULL)) { | 3894 | (!__xfs_iflags_test(ip, XFS_IRECLAIMABLE) && vp == NULL)) { |
3895 | spin_unlock(&ip->i_flags_lock); | 3895 | spin_unlock(&ip->i_flags_lock); |
3896 | write_unlock(&ih->ih_lock); | 3896 | write_unlock(&pag->pag_ici_lock); |
3897 | if (locked) { | 3897 | if (locked) { |
3898 | xfs_ifunlock(ip); | 3898 | xfs_ifunlock(ip); |
3899 | xfs_iunlock(ip, XFS_ILOCK_EXCL); | 3899 | xfs_iunlock(ip, XFS_ILOCK_EXCL); |
@@ -3902,7 +3902,8 @@ xfs_finish_reclaim( | |||
3902 | } | 3902 | } |
3903 | __xfs_iflags_set(ip, XFS_IRECLAIM); | 3903 | __xfs_iflags_set(ip, XFS_IRECLAIM); |
3904 | spin_unlock(&ip->i_flags_lock); | 3904 | spin_unlock(&ip->i_flags_lock); |
3905 | write_unlock(&ih->ih_lock); | 3905 | write_unlock(&pag->pag_ici_lock); |
3906 | xfs_put_perag(ip->i_mount, pag); | ||
3906 | 3907 | ||
3907 | /* | 3908 | /* |
3908 | * If the inode is still dirty, then flush it out. If the inode | 3909 | * If the inode is still dirty, then flush it out. If the inode |