diff options
author | Christoph Hellwig <hch@infradead.org> | 2007-08-29 11:44:37 +1000 |
---|---|---|
committer | Tim Shimmin <tes@chook.melbourne.sgi.com> | 2007-10-16 11:37:29 +1000 |
commit | b3aea4edc2903fdee34920630b8b2433f6452f02 (patch) | |
tree | 9d9e93c4dac6dc5a30522e0c2ae051e3aad46b1b /fs/xfs/xfs_vnodeops.c | |
parent | 2f6f7b3d9b5600e1f6e7622c62ab30f36bd0f57f (diff) | |
download | blackbird-op-linux-b3aea4edc2903fdee34920630b8b2433f6452f02.tar.gz blackbird-op-linux-b3aea4edc2903fdee34920630b8b2433f6452f02.zip |
[XFS] kill the v_flag member in struct bhv_vnode
All flags previously handled at the vnode level are not in the xfs_inode
where we already have a flags mechanisms and free bits for flags
previously in the vnode.
SGI-PV: 969608
SGI-Modid: xfs-linux-melb:xfs-kern:29495a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 7ebbfa0c4f0f..f2c037a9564e 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c @@ -660,7 +660,7 @@ xfs_setattr( * vnode and flush it when the file is closed, and * do not wait the usual (long) time for writeout. */ - VTRUNCATE(vp); + xfs_iflags_set(ip, XFS_ITRUNCATED); } /* * Have to do this even if the file's size doesn't change. @@ -1519,6 +1519,8 @@ xfs_release( return 0; if (!XFS_FORCED_SHUTDOWN(mp)) { + int truncated; + /* * If we are using filestreams, and we have an unlinked * file that we are processing the last close on, then nothing @@ -1539,7 +1541,13 @@ xfs_release( * significantly reducing the time window where we'd otherwise * be exposed to that problem. */ - if (VUNTRUNCATE(vp) && VN_DIRTY(vp) && ip->i_delayed_blks > 0) + spin_lock(&ip->i_flags_lock); + truncated = __xfs_iflags_test(ip, XFS_ITRUNCATED); + if (truncated) + ip->i_flags &= ~XFS_ITRUNCATED; + spin_unlock(&ip->i_flags_lock); + + if (truncated && VN_DIRTY(vp) && ip->i_delayed_blks > 0) xfs_flush_pages(ip, 0, -1, XFS_B_ASYNC, FI_NONE); } |