diff options
author | David Chinner <dgc@sgi.com> | 2006-11-11 02:04:54 -0500 |
---|---|---|
committer | Tim Shimmin <tes@sgi.com> | 2006-11-11 02:04:54 -0500 |
commit | 7a18c386078eaf17ae54595f66c0d64d9c1cb29c (patch) | |
tree | d3194ced5802969f78cbd21c9d99dc01c622bb51 /fs/xfs/xfs_iget.c | |
parent | 2e2e7bb1fd857b9fc83b0cd77b6b647ebb423301 (diff) |
[XFS] Clean up i_flags and i_flags_lock handling.
SGI-PV: 956832
SGI-Modid: xfs-linux-melb:xfs-kern:27358a
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Nathan Scott <nscott@aconex.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_iget.c')
-rw-r--r-- | fs/xfs/xfs_iget.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c index 1562ac2dd67c..4b0c1881d6d5 100644 --- a/fs/xfs/xfs_iget.c +++ b/fs/xfs/xfs_iget.c | |||
@@ -215,7 +215,7 @@ again: | |||
215 | * If INEW is set this inode is being set up | 215 | * If INEW is set this inode is being set up |
216 | * we need to pause and try again. | 216 | * we need to pause and try again. |
217 | */ | 217 | */ |
218 | if (ip->i_flags & XFS_INEW) { | 218 | if (xfs_iflags_test(ip, XFS_INEW)) { |
219 | read_unlock(&ih->ih_lock); | 219 | read_unlock(&ih->ih_lock); |
220 | delay(1); | 220 | delay(1); |
221 | XFS_STATS_INC(xs_ig_frecycle); | 221 | XFS_STATS_INC(xs_ig_frecycle); |
@@ -230,7 +230,7 @@ again: | |||
230 | * on its way out of the system, | 230 | * on its way out of the system, |
231 | * we need to pause and try again. | 231 | * we need to pause and try again. |
232 | */ | 232 | */ |
233 | if (ip->i_flags & XFS_IRECLAIM) { | 233 | if (xfs_iflags_test(ip, XFS_IRECLAIM)) { |
234 | read_unlock(&ih->ih_lock); | 234 | read_unlock(&ih->ih_lock); |
235 | delay(1); | 235 | delay(1); |
236 | XFS_STATS_INC(xs_ig_frecycle); | 236 | XFS_STATS_INC(xs_ig_frecycle); |
@@ -243,9 +243,7 @@ again: | |||
243 | 243 | ||
244 | XFS_STATS_INC(xs_ig_found); | 244 | XFS_STATS_INC(xs_ig_found); |
245 | 245 | ||
246 | spin_lock(&ip->i_flags_lock); | 246 | xfs_iflags_clear(ip, XFS_IRECLAIMABLE); |
247 | ip->i_flags &= ~XFS_IRECLAIMABLE; | ||
248 | spin_unlock(&ip->i_flags_lock); | ||
249 | version = ih->ih_version; | 247 | version = ih->ih_version; |
250 | read_unlock(&ih->ih_lock); | 248 | read_unlock(&ih->ih_lock); |
251 | xfs_ihash_promote(ih, ip, version); | 249 | xfs_ihash_promote(ih, ip, version); |
@@ -299,10 +297,7 @@ finish_inode: | |||
299 | if (lock_flags != 0) | 297 | if (lock_flags != 0) |
300 | xfs_ilock(ip, lock_flags); | 298 | xfs_ilock(ip, lock_flags); |
301 | 299 | ||
302 | spin_lock(&ip->i_flags_lock); | 300 | xfs_iflags_clear(ip, XFS_ISTALE); |
303 | ip->i_flags &= ~XFS_ISTALE; | ||
304 | spin_unlock(&ip->i_flags_lock); | ||
305 | |||
306 | vn_trace_exit(vp, "xfs_iget.found", | 301 | vn_trace_exit(vp, "xfs_iget.found", |
307 | (inst_t *)__return_address); | 302 | (inst_t *)__return_address); |
308 | goto return_ip; | 303 | goto return_ip; |
@@ -371,10 +366,7 @@ finish_inode: | |||
371 | ih->ih_next = ip; | 366 | ih->ih_next = ip; |
372 | ip->i_udquot = ip->i_gdquot = NULL; | 367 | ip->i_udquot = ip->i_gdquot = NULL; |
373 | ih->ih_version++; | 368 | ih->ih_version++; |
374 | spin_lock(&ip->i_flags_lock); | 369 | xfs_iflags_set(ip, XFS_INEW); |
375 | ip->i_flags |= XFS_INEW; | ||
376 | spin_unlock(&ip->i_flags_lock); | ||
377 | |||
378 | write_unlock(&ih->ih_lock); | 370 | write_unlock(&ih->ih_lock); |
379 | 371 | ||
380 | /* | 372 | /* |
@@ -625,7 +617,7 @@ xfs_iput_new(xfs_inode_t *ip, | |||
625 | vn_trace_entry(vp, "xfs_iput_new", (inst_t *)__return_address); | 617 | vn_trace_entry(vp, "xfs_iput_new", (inst_t *)__return_address); |
626 | 618 | ||
627 | if ((ip->i_d.di_mode == 0)) { | 619 | if ((ip->i_d.di_mode == 0)) { |
628 | ASSERT(!(ip->i_flags & XFS_IRECLAIMABLE)); | 620 | ASSERT(!xfs_iflags_test(ip, XFS_IRECLAIMABLE)); |
629 | vn_mark_bad(vp); | 621 | vn_mark_bad(vp); |
630 | } | 622 | } |
631 | if (inode->i_state & I_NEW) | 623 | if (inode->i_state & I_NEW) |