diff options
Diffstat (limited to 'fs/xfs/xfs_inode.c')
| -rw-r--r-- | fs/xfs/xfs_inode.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index c27d7d495aa0..17d2a471751e 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
| @@ -2193,7 +2193,7 @@ xfs_ifree_cluster( | |||
| 2193 | /* Inode not in memory or we found it already, | 2193 | /* Inode not in memory or we found it already, |
| 2194 | * nothing to do | 2194 | * nothing to do |
| 2195 | */ | 2195 | */ |
| 2196 | if (!ip || (ip->i_flags & XFS_ISTALE)) { | 2196 | if (!ip || xfs_iflags_test(ip, XFS_ISTALE)) { |
| 2197 | read_unlock(&ih->ih_lock); | 2197 | read_unlock(&ih->ih_lock); |
| 2198 | continue; | 2198 | continue; |
| 2199 | } | 2199 | } |
| @@ -2215,10 +2215,7 @@ xfs_ifree_cluster( | |||
| 2215 | 2215 | ||
| 2216 | if (ip == free_ip) { | 2216 | if (ip == free_ip) { |
| 2217 | if (xfs_iflock_nowait(ip)) { | 2217 | if (xfs_iflock_nowait(ip)) { |
| 2218 | spin_lock(&ip->i_flags_lock); | 2218 | xfs_iflags_set(ip, XFS_ISTALE); |
| 2219 | ip->i_flags |= XFS_ISTALE; | ||
| 2220 | spin_unlock(&ip->i_flags_lock); | ||
| 2221 | |||
| 2222 | if (xfs_inode_clean(ip)) { | 2219 | if (xfs_inode_clean(ip)) { |
| 2223 | xfs_ifunlock(ip); | 2220 | xfs_ifunlock(ip); |
| 2224 | } else { | 2221 | } else { |
| @@ -2231,9 +2228,7 @@ xfs_ifree_cluster( | |||
| 2231 | 2228 | ||
| 2232 | if (xfs_ilock_nowait(ip, XFS_ILOCK_EXCL)) { | 2229 | if (xfs_ilock_nowait(ip, XFS_ILOCK_EXCL)) { |
| 2233 | if (xfs_iflock_nowait(ip)) { | 2230 | if (xfs_iflock_nowait(ip)) { |
| 2234 | spin_lock(&ip->i_flags_lock); | 2231 | xfs_iflags_set(ip, XFS_ISTALE); |
| 2235 | ip->i_flags |= XFS_ISTALE; | ||
| 2236 | spin_unlock(&ip->i_flags_lock); | ||
| 2237 | 2232 | ||
| 2238 | if (xfs_inode_clean(ip)) { | 2233 | if (xfs_inode_clean(ip)) { |
| 2239 | xfs_ifunlock(ip); | 2234 | xfs_ifunlock(ip); |
| @@ -2263,9 +2258,7 @@ xfs_ifree_cluster( | |||
| 2263 | AIL_LOCK(mp,s); | 2258 | AIL_LOCK(mp,s); |
| 2264 | iip->ili_flush_lsn = iip->ili_item.li_lsn; | 2259 | iip->ili_flush_lsn = iip->ili_item.li_lsn; |
| 2265 | AIL_UNLOCK(mp, s); | 2260 | AIL_UNLOCK(mp, s); |
| 2266 | spin_lock(&iip->ili_inode->i_flags_lock); | 2261 | xfs_iflags_set(ip, XFS_ISTALE); |
| 2267 | iip->ili_inode->i_flags |= XFS_ISTALE; | ||
| 2268 | spin_unlock(&iip->ili_inode->i_flags_lock); | ||
| 2269 | pre_flushed++; | 2262 | pre_flushed++; |
| 2270 | } | 2263 | } |
| 2271 | lip = lip->li_bio_list; | 2264 | lip = lip->li_bio_list; |
| @@ -2764,7 +2757,7 @@ xfs_iunpin( | |||
| 2764 | struct inode *inode = NULL; | 2757 | struct inode *inode = NULL; |
| 2765 | 2758 | ||
| 2766 | spin_lock(&ip->i_flags_lock); | 2759 | spin_lock(&ip->i_flags_lock); |
| 2767 | if (!(ip->i_flags & (XFS_IRECLAIM|XFS_IRECLAIMABLE))) { | 2760 | if (!__xfs_iflags_test(ip, XFS_IRECLAIM|XFS_IRECLAIMABLE)) { |
| 2768 | bhv_vnode_t *vp = XFS_ITOV_NULL(ip); | 2761 | bhv_vnode_t *vp = XFS_ITOV_NULL(ip); |
| 2769 | 2762 | ||
| 2770 | /* make sync come back and flush this inode */ | 2763 | /* make sync come back and flush this inode */ |
