diff options
author | Brian Foster <bfoster@redhat.com> | 2018-07-11 22:26:13 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-07-11 22:26:13 -0700 |
commit | 4bcfa613a0582a9992a6c2af82273bd770103d12 (patch) | |
tree | 07b05f8a462387bc4a8935b0c64f478f9484a979 /fs/xfs/xfs_symlink.c | |
parent | 6e702a5dcbe1d38cf479931dd2e2a3da884143f0 (diff) |
xfs: use ->t_dfops for all xfs_bunmapi() callers
Use ->t_dfops for all remaining xfs_bunmapi() callers. This prepares
the latter to no longer require a dfops parameter.
Note that xfs_itruncate_extents_flags() associates a local dfops
with a transaction provided from the caller. Since there are
multiple callers, set and reset ->t_dfops before the function
returns to avoid exposure of stack memory to the caller.
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/xfs_symlink.c')
-rw-r--r-- | fs/xfs/xfs_symlink.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/xfs/xfs_symlink.c b/fs/xfs/xfs_symlink.c index 2b6bcfd39c14..290ae13d4673 100644 --- a/fs/xfs/xfs_symlink.c +++ b/fs/xfs/xfs_symlink.c @@ -444,6 +444,7 @@ xfs_inactive_symlink_rmt( */ done = 0; xfs_defer_init(&dfops, &first_block); + tp->t_dfops = &dfops; nmaps = ARRAY_SIZE(mval); error = xfs_bmapi_read(ip, 0, xfs_symlink_blocks(mp, size), mval, &nmaps, 0); @@ -466,15 +467,15 @@ xfs_inactive_symlink_rmt( * Unmap the dead block(s) to the dfops. */ error = xfs_bunmapi(tp, ip, 0, size, 0, nmaps, - &first_block, &dfops, &done); + &first_block, tp->t_dfops, &done); if (error) goto error_bmap_cancel; ASSERT(done); /* * Commit the first transaction. This logs the EFI and the inode. */ - xfs_defer_ijoin(&dfops, ip); - error = xfs_defer_finish(&tp, &dfops); + xfs_defer_ijoin(tp->t_dfops, ip); + error = xfs_defer_finish(&tp, tp->t_dfops); if (error) goto error_bmap_cancel; @@ -499,7 +500,7 @@ xfs_inactive_symlink_rmt( return 0; error_bmap_cancel: - xfs_defer_cancel(&dfops); + xfs_defer_cancel(tp->t_dfops); error_trans_cancel: xfs_trans_cancel(tp); error_unlock: |