aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2018-07-12 01:26:13 -0400
committerDarrick J. Wong <darrick.wong@oracle.com>2018-07-12 01:26:13 -0400
commitccd9d91148780a5e979ac00bce67c2155fb6378f (patch)
tree6a205b024861f4849d28058a849cc96b3aceeaf1
parent4bcfa613a0582a9992a6c2af82273bd770103d12 (diff)
xfs: remove xfs_bunmapi() dfops param
Now that all xfs_bunmapi() callers use ->t_dfops, remove the unnecessary parameter and access ->t_dfops directly. This patch does not change behavior. 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>
-rw-r--r--fs/xfs/libxfs/xfs_attr_remote.c2
-rw-r--r--fs/xfs/libxfs/xfs_bmap.c20
-rw-r--r--fs/xfs/libxfs/xfs_bmap.h5
-rw-r--r--fs/xfs/libxfs/xfs_da_btree.c2
-rw-r--r--fs/xfs/libxfs/xfs_dir2.c2
-rw-r--r--fs/xfs/xfs_bmap_util.c2
-rw-r--r--fs/xfs/xfs_inode.c2
-rw-r--r--fs/xfs/xfs_reflink.c5
-rw-r--r--fs/xfs/xfs_symlink.c3
9 files changed, 19 insertions, 24 deletions
diff --git a/fs/xfs/libxfs/xfs_attr_remote.c b/fs/xfs/libxfs/xfs_attr_remote.c
index 1f2bc86a28ed..179259fd1b5e 100644
--- a/fs/xfs/libxfs/xfs_attr_remote.c
+++ b/fs/xfs/libxfs/xfs_attr_remote.c
@@ -629,7 +629,7 @@ xfs_attr_rmtval_remove(
629 xfs_defer_init(args->trans->t_dfops, args->firstblock); 629 xfs_defer_init(args->trans->t_dfops, args->firstblock);
630 error = xfs_bunmapi(args->trans, args->dp, lblkno, blkcnt, 630 error = xfs_bunmapi(args->trans, args->dp, lblkno, blkcnt,
631 XFS_BMAPI_ATTRFORK, 1, args->firstblock, 631 XFS_BMAPI_ATTRFORK, 1, args->firstblock,
632 args->trans->t_dfops, &done); 632 &done);
633 if (error) 633 if (error)
634 goto out_defer_cancel; 634 goto out_defer_cancel;
635 xfs_defer_ijoin(args->trans->t_dfops, args->dp); 635 xfs_defer_ijoin(args->trans->t_dfops, args->dp);
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index 02e72c195c4f..9c778e50ad19 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -5143,26 +5143,26 @@ done:
5143 */ 5143 */
5144int /* error */ 5144int /* error */
5145__xfs_bunmapi( 5145__xfs_bunmapi(
5146 xfs_trans_t *tp, /* transaction pointer */ 5146 struct xfs_trans *tp, /* transaction pointer */
5147 struct xfs_inode *ip, /* incore inode */ 5147 struct xfs_inode *ip, /* incore inode */
5148 xfs_fileoff_t start, /* first file offset deleted */ 5148 xfs_fileoff_t start, /* first file offset deleted */
5149 xfs_filblks_t *rlen, /* i/o: amount remaining */ 5149 xfs_filblks_t *rlen, /* i/o: amount remaining */
5150 int flags, /* misc flags */ 5150 int flags, /* misc flags */
5151 xfs_extnum_t nexts, /* number of extents max */ 5151 xfs_extnum_t nexts, /* number of extents max */
5152 xfs_fsblock_t *firstblock, /* first allocated block 5152 xfs_fsblock_t *firstblock) /* first allocated block
5153 controls a.g. for allocs */ 5153 controls a.g. for allocs */
5154 struct xfs_defer_ops *dfops) /* i/o: deferred updates */
5155{ 5154{
5156 xfs_btree_cur_t *cur; /* bmap btree cursor */ 5155 struct xfs_defer_ops *dfops = tp ? tp->t_dfops : NULL;
5157 xfs_bmbt_irec_t del; /* extent being deleted */ 5156 struct xfs_btree_cur *cur; /* bmap btree cursor */
5157 struct xfs_bmbt_irec del; /* extent being deleted */
5158 int error; /* error return value */ 5158 int error; /* error return value */
5159 xfs_extnum_t extno; /* extent number in list */ 5159 xfs_extnum_t extno; /* extent number in list */
5160 xfs_bmbt_irec_t got; /* current extent record */ 5160 struct xfs_bmbt_irec got; /* current extent record */
5161 xfs_ifork_t *ifp; /* inode fork pointer */ 5161 xfs_ifork_t *ifp; /* inode fork pointer */
5162 int isrt; /* freeing in rt area */ 5162 int isrt; /* freeing in rt area */
5163 int logflags; /* transaction logging flags */ 5163 int logflags; /* transaction logging flags */
5164 xfs_extlen_t mod; /* rt extent offset */ 5164 xfs_extlen_t mod; /* rt extent offset */
5165 xfs_mount_t *mp; /* mount structure */ 5165 struct xfs_mount *mp; /* mount structure */
5166 int tmp_logflags; /* partial logging flags */ 5166 int tmp_logflags; /* partial logging flags */
5167 int wasdel; /* was a delayed alloc extent */ 5167 int wasdel; /* was a delayed alloc extent */
5168 int whichfork; /* data or attribute fork */ 5168 int whichfork; /* data or attribute fork */
@@ -5516,13 +5516,11 @@ xfs_bunmapi(
5516 int flags, 5516 int flags,
5517 xfs_extnum_t nexts, 5517 xfs_extnum_t nexts,
5518 xfs_fsblock_t *firstblock, 5518 xfs_fsblock_t *firstblock,
5519 struct xfs_defer_ops *dfops,
5520 int *done) 5519 int *done)
5521{ 5520{
5522 int error; 5521 int error;
5523 5522
5524 error = __xfs_bunmapi(tp, ip, bno, &len, flags, nexts, firstblock, 5523 error = __xfs_bunmapi(tp, ip, bno, &len, flags, nexts, firstblock);
5525 dfops);
5526 *done = (len == 0); 5524 *done = (len == 0);
5527 return error; 5525 return error;
5528} 5526}
@@ -6193,7 +6191,7 @@ xfs_bmap_finish_one(
6193 break; 6191 break;
6194 case XFS_BMAP_UNMAP: 6192 case XFS_BMAP_UNMAP:
6195 error = __xfs_bunmapi(tp, ip, startoff, blockcount, 6193 error = __xfs_bunmapi(tp, ip, startoff, blockcount,
6196 XFS_BMAPI_REMAP, 1, &firstfsb, dfops); 6194 XFS_BMAPI_REMAP, 1, &firstfsb);
6197 break; 6195 break;
6198 default: 6196 default:
6199 ASSERT(0); 6197 ASSERT(0);
diff --git a/fs/xfs/libxfs/xfs_bmap.h b/fs/xfs/libxfs/xfs_bmap.h
index fc86cc218c58..a83906ec6141 100644
--- a/fs/xfs/libxfs/xfs_bmap.h
+++ b/fs/xfs/libxfs/xfs_bmap.h
@@ -206,12 +206,11 @@ int xfs_bmapi_write(struct xfs_trans *tp, struct xfs_inode *ip,
206 struct xfs_bmbt_irec *mval, int *nmap); 206 struct xfs_bmbt_irec *mval, int *nmap);
207int __xfs_bunmapi(struct xfs_trans *tp, struct xfs_inode *ip, 207int __xfs_bunmapi(struct xfs_trans *tp, struct xfs_inode *ip,
208 xfs_fileoff_t bno, xfs_filblks_t *rlen, int flags, 208 xfs_fileoff_t bno, xfs_filblks_t *rlen, int flags,
209 xfs_extnum_t nexts, xfs_fsblock_t *firstblock, 209 xfs_extnum_t nexts, xfs_fsblock_t *firstblock);
210 struct xfs_defer_ops *dfops);
211int xfs_bunmapi(struct xfs_trans *tp, struct xfs_inode *ip, 210int xfs_bunmapi(struct xfs_trans *tp, struct xfs_inode *ip,
212 xfs_fileoff_t bno, xfs_filblks_t len, int flags, 211 xfs_fileoff_t bno, xfs_filblks_t len, int flags,
213 xfs_extnum_t nexts, xfs_fsblock_t *firstblock, 212 xfs_extnum_t nexts, xfs_fsblock_t *firstblock,
214 struct xfs_defer_ops *dfops, int *done); 213 int *done);
215int xfs_bmap_del_extent_delay(struct xfs_inode *ip, int whichfork, 214int xfs_bmap_del_extent_delay(struct xfs_inode *ip, int whichfork,
216 struct xfs_iext_cursor *cur, struct xfs_bmbt_irec *got, 215 struct xfs_iext_cursor *cur, struct xfs_bmbt_irec *got,
217 struct xfs_bmbt_irec *del); 216 struct xfs_bmbt_irec *del);
diff --git a/fs/xfs/libxfs/xfs_da_btree.c b/fs/xfs/libxfs/xfs_da_btree.c
index e43f1dda02e4..68a72e3d9f53 100644
--- a/fs/xfs/libxfs/xfs_da_btree.c
+++ b/fs/xfs/libxfs/xfs_da_btree.c
@@ -2395,7 +2395,7 @@ xfs_da_shrink_inode(
2395 */ 2395 */
2396 error = xfs_bunmapi(tp, dp, dead_blkno, count, 2396 error = xfs_bunmapi(tp, dp, dead_blkno, count,
2397 xfs_bmapi_aflag(w), 0, args->firstblock, 2397 xfs_bmapi_aflag(w), 0, args->firstblock,
2398 args->trans->t_dfops, &done); 2398 &done);
2399 if (error == -ENOSPC) { 2399 if (error == -ENOSPC) {
2400 if (w != XFS_DATA_FORK) 2400 if (w != XFS_DATA_FORK)
2401 break; 2401 break;
diff --git a/fs/xfs/libxfs/xfs_dir2.c b/fs/xfs/libxfs/xfs_dir2.c
index b21f55a11f35..781dc63d305d 100644
--- a/fs/xfs/libxfs/xfs_dir2.c
+++ b/fs/xfs/libxfs/xfs_dir2.c
@@ -664,7 +664,7 @@ xfs_dir2_shrink_inode(
664 664
665 /* Unmap the fsblock(s). */ 665 /* Unmap the fsblock(s). */
666 error = xfs_bunmapi(tp, dp, da, args->geo->fsbcount, 0, 0, 666 error = xfs_bunmapi(tp, dp, da, args->geo->fsbcount, 0, 0,
667 args->firstblock, args->trans->t_dfops, &done); 667 args->firstblock, &done);
668 if (error) { 668 if (error) {
669 /* 669 /*
670 * ENOSPC actually can happen if we're in a removename with no 670 * ENOSPC actually can happen if we're in a removename with no
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index 76f28b823866..6c02cd264045 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -1046,7 +1046,7 @@ xfs_unmap_extent(
1046 xfs_defer_init(&dfops, &firstfsb); 1046 xfs_defer_init(&dfops, &firstfsb);
1047 tp->t_dfops = &dfops; 1047 tp->t_dfops = &dfops;
1048 error = xfs_bunmapi(tp, ip, startoffset_fsb, len_fsb, 0, 2, &firstfsb, 1048 error = xfs_bunmapi(tp, ip, startoffset_fsb, len_fsb, 0, 2, &firstfsb,
1049 tp->t_dfops, done); 1049 done);
1050 if (error) 1050 if (error)
1051 goto out_bmap_cancel; 1051 goto out_bmap_cancel;
1052 1052
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 539d96201666..f456df2e1394 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1588,7 +1588,7 @@ xfs_itruncate_extents_flags(
1588 tp->t_dfops = &dfops; 1588 tp->t_dfops = &dfops;
1589 error = xfs_bunmapi(tp, ip, first_unmap_block, unmap_len, flags, 1589 error = xfs_bunmapi(tp, ip, first_unmap_block, unmap_len, flags,
1590 XFS_ITRUNC_MAX_EXTENTS, &first_block, 1590 XFS_ITRUNC_MAX_EXTENTS, &first_block,
1591 tp->t_dfops, &done); 1591 &done);
1592 if (error) 1592 if (error)
1593 goto out_bmap_cancel; 1593 goto out_bmap_cancel;
1594 1594
diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c
index c119cd33766e..0ac0706c98e8 100644
--- a/fs/xfs/xfs_reflink.c
+++ b/fs/xfs/xfs_reflink.c
@@ -703,7 +703,7 @@ xfs_reflink_end_cow(
703 tp->t_dfops = &dfops; 703 tp->t_dfops = &dfops;
704 rlen = del.br_blockcount; 704 rlen = del.br_blockcount;
705 error = __xfs_bunmapi(tp, ip, del.br_startoff, &rlen, 0, 1, 705 error = __xfs_bunmapi(tp, ip, del.br_startoff, &rlen, 0, 1,
706 &firstfsb, tp->t_dfops); 706 &firstfsb);
707 if (error) 707 if (error)
708 goto out_defer; 708 goto out_defer;
709 709
@@ -1052,8 +1052,7 @@ xfs_reflink_remap_extent(
1052 while (rlen) { 1052 while (rlen) {
1053 xfs_defer_init(&dfops, &firstfsb); 1053 xfs_defer_init(&dfops, &firstfsb);
1054 tp->t_dfops = &dfops; 1054 tp->t_dfops = &dfops;
1055 error = __xfs_bunmapi(tp, ip, destoff, &rlen, 0, 1, 1055 error = __xfs_bunmapi(tp, ip, destoff, &rlen, 0, 1, &firstfsb);
1056 &firstfsb, tp->t_dfops);
1057 if (error) 1056 if (error)
1058 goto out_defer; 1057 goto out_defer;
1059 1058
diff --git a/fs/xfs/xfs_symlink.c b/fs/xfs/xfs_symlink.c
index 290ae13d4673..a54f095c1409 100644
--- a/fs/xfs/xfs_symlink.c
+++ b/fs/xfs/xfs_symlink.c
@@ -466,8 +466,7 @@ xfs_inactive_symlink_rmt(
466 /* 466 /*
467 * Unmap the dead block(s) to the dfops. 467 * Unmap the dead block(s) to the dfops.
468 */ 468 */
469 error = xfs_bunmapi(tp, ip, 0, size, 0, nmaps, 469 error = xfs_bunmapi(tp, ip, 0, size, 0, nmaps, &first_block, &done);
470 &first_block, tp->t_dfops, &done);
471 if (error) 470 if (error)
472 goto error_bmap_cancel; 471 goto error_bmap_cancel;
473 ASSERT(done); 472 ASSERT(done);