diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-12-18 21:00:04 +0100 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-01-13 19:11:45 +0100 |
commit | 673e8e597c06eb81954bf21a10f5cce74a1de8f1 (patch) | |
tree | a6d47b0c44dfe24119de8d4c944f7c5c6e2c30dc /fs/xfs/xfs_attr.c | |
parent | Merge branch 'akpm' (aka "Andrew's patch-bomb, take two") (diff) | |
download | linux-673e8e597c06eb81954bf21a10f5cce74a1de8f1.tar.xz linux-673e8e597c06eb81954bf21a10f5cce74a1de8f1.zip |
xfs: remove xfs_itruncate_data
This wrapper isn't overly useful, not to say rather confusing.
Around the call to xfs_itruncate_extents it does:
- add tracing
- add a few asserts in debug builds
- conditionally update the inode size in two places
- log the inode
Both the tracing and the inode logging can be moved to xfs_itruncate_extents
as they are useful for the attribute fork as well - in fact the attr code
already does an equivalent xfs_trans_log_inode call just after calling
xfs_itruncate_extents. The conditional size updates are a mess, and there
was no reason to do them in two places anyway, as the first one was
conditional on the inode having extents - but without extents we
xfs_itruncate_extents would be a no-op and the placement wouldn't matter
anyway. Instead move the size assignments and the asserts that make sense
to the callers that want it.
As a side effect of this clean up xfs_setattr_size by introducing variables
for the old and new inode size, and moving the size updates into a common
place.
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_attr.c')
-rw-r--r-- | fs/xfs/xfs_attr.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c index 1e5d97f86ea8..08b9ac644c31 100644 --- a/fs/xfs/xfs_attr.c +++ b/fs/xfs/xfs_attr.c @@ -827,10 +827,6 @@ xfs_attr_inactive(xfs_inode_t *dp) if (error) goto out; - /* - * Commit the last in the sequence of transactions. - */ - xfs_trans_log_inode(trans, dp, XFS_ILOG_CORE); error = xfs_trans_commit(trans, XFS_TRANS_RELEASE_LOG_RES); xfs_iunlock(dp, XFS_ILOCK_EXCL); |