aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_attr_remote.c
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2018-07-11 22:26:19 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2018-07-11 22:26:19 -0700
commitbcd2c9f33559764e0d306e226a8aa88bc2e1e6fb (patch)
tree9fbdeaca5d91293ee5ed2604443893276b3d029e /fs/xfs/libxfs/xfs_attr_remote.c
parentxfs: use ->t_dfops in reflink cow recover path (diff)
downloadlinux-dev-bcd2c9f33559764e0d306e226a8aa88bc2e1e6fb.tar.xz
linux-dev-bcd2c9f33559764e0d306e226a8aa88bc2e1e6fb.zip
xfs: refactor dfops init to attach to transaction
Most callers of xfs_defer_init() immediately attach the dfops structure to a transaction. Add a transaction parameter to eliminate much of this boilerplate code. This also helps self-document the fact that many codepaths now expect a dfops pointer implicitly via xfs_trans->t_dfops. Signed-off-by: Brian Foster <bfoster@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/libxfs/xfs_attr_remote.c')
-rw-r--r--fs/xfs/libxfs/xfs_attr_remote.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/libxfs/xfs_attr_remote.c b/fs/xfs/libxfs/xfs_attr_remote.c
index 179259fd1b5e..ab7c2755ad8c 100644
--- a/fs/xfs/libxfs/xfs_attr_remote.c
+++ b/fs/xfs/libxfs/xfs_attr_remote.c
@@ -480,7 +480,7 @@ xfs_attr_rmtval_set(
* extent and then crash then the block may not contain the
* correct metadata after log recovery occurs.
*/
- xfs_defer_init(args->trans->t_dfops, args->firstblock);
+ xfs_defer_init(NULL, args->trans->t_dfops, args->firstblock);
nmap = 1;
error = xfs_bmapi_write(args->trans, dp, (xfs_fileoff_t)lblkno,
blkcnt, XFS_BMAPI_ATTRFORK, args->firstblock,
@@ -522,7 +522,7 @@ xfs_attr_rmtval_set(
ASSERT(blkcnt > 0);
- xfs_defer_init(args->trans->t_dfops, args->firstblock);
+ xfs_defer_init(NULL, args->trans->t_dfops, args->firstblock);
nmap = 1;
error = xfs_bmapi_read(dp, (xfs_fileoff_t)lblkno,
blkcnt, &map, &nmap,
@@ -626,7 +626,7 @@ xfs_attr_rmtval_remove(
blkcnt = args->rmtblkcnt;
done = 0;
while (!done) {
- xfs_defer_init(args->trans->t_dfops, args->firstblock);
+ xfs_defer_init(NULL, args->trans->t_dfops, args->firstblock);
error = xfs_bunmapi(args->trans, args->dp, lblkno, blkcnt,
XFS_BMAPI_ATTRFORK, 1, args->firstblock,
&done);