diff options
author | 2018-07-24 13:43:13 -0700 | |
---|---|---|
committer | 2018-07-26 10:15:15 -0700 | |
commit | c8eac49ef798a7d00240847f63902caa1388241a (patch) | |
tree | 4decb579e8809ba64cf1114d40ca78ff6ccc202d /fs/xfs/xfs_iops.c | |
parent | xfs: use internal dfops during [b|c]ui recovery (diff) | |
download | linux-c8eac49ef798a7d00240847f63902caa1388241a.tar.gz linux-c8eac49ef798a7d00240847f63902caa1388241a.tar.bz2 linux-c8eac49ef798a7d00240847f63902caa1388241a.zip |
xfs: remove all boilerplate defer init/finish code
At this point, the transaction subsystem completely manages deferred
items internally such that the common and boilerplate
xfs_trans_alloc() -> xfs_defer_init() -> xfs_defer_finish() ->
xfs_trans_commit() sequence can be replaced with a simple
transaction allocation and commit.
Remove all such boilerplate deferred ops code. In doing so, we
change each case over to use the dfops in the transaction and
specifically eliminate:
- The on-stack dfops and associated xfs_defer_init() call, as the
internal dfops is initialized on transaction allocation.
- xfs_bmap_finish() calls that precede a final xfs_trans_commit() of
a transaction.
- xfs_defer_cancel() calls in error handlers that precede a
transaction cancel.
The only deferred ops calls that remain are those that are
non-deterministic with respect to the final commit of the associated
transaction or are open-coded due to special handling.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_iops.c')
-rw-r--r-- | fs/xfs/xfs_iops.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index 704b57a8b99e..2eac22bfad6a 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c @@ -813,7 +813,6 @@ xfs_setattr_size( struct inode *inode = VFS_I(ip); xfs_off_t oldsize, newsize; struct xfs_trans *tp; - struct xfs_defer_ops dfops; int error; uint lock_flags = 0; bool did_zeroing = false; @@ -917,7 +916,6 @@ xfs_setattr_size( error = xfs_trans_alloc(mp, &M_RES(mp)->tr_itruncate, 0, 0, 0, &tp); if (error) return error; - xfs_defer_init(tp, &dfops); lock_flags |= XFS_ILOCK_EXCL; xfs_ilock(ip, XFS_ILOCK_EXCL); |