Skip to content

Commit dfb8759

Browse files
Christoph Hellwigdjwong
authored andcommitted
xfs: remove the mappedbno argument to xfs_attr3_leaf_read
This argument is always hard coded to -1, so remove it. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent 06566fd commit dfb8759

File tree

4 files changed

+17
-18
lines changed

4 files changed

+17
-18
lines changed

fs/xfs/libxfs/xfs_attr.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ xfs_attr_leaf_addname(
589589
*/
590590
dp = args->dp;
591591
args->blkno = 0;
592-
error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp);
592+
error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, &bp);
593593
if (error)
594594
return error;
595595

@@ -715,7 +715,7 @@ xfs_attr_leaf_addname(
715715
* remove the "old" attr from that block (neat, huh!)
716716
*/
717717
error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno,
718-
-1, &bp);
718+
&bp);
719719
if (error)
720720
return error;
721721

@@ -769,7 +769,7 @@ xfs_attr_leaf_removename(
769769
*/
770770
dp = args->dp;
771771
args->blkno = 0;
772-
error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp);
772+
error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, &bp);
773773
if (error)
774774
return error;
775775

@@ -813,7 +813,7 @@ xfs_attr_leaf_get(xfs_da_args_t *args)
813813
trace_xfs_attr_leaf_get(args);
814814

815815
args->blkno = 0;
816-
error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp);
816+
error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, &bp);
817817
if (error)
818818
return error;
819819

@@ -1173,7 +1173,7 @@ xfs_attr_node_removename(
11731173
ASSERT(state->path.blk[0].bp);
11741174
state->path.blk[0].bp = NULL;
11751175

1176-
error = xfs_attr3_leaf_read(args->trans, args->dp, 0, -1, &bp);
1176+
error = xfs_attr3_leaf_read(args->trans, args->dp, 0, &bp);
11771177
if (error)
11781178
goto out;
11791179

fs/xfs/libxfs/xfs_attr_leaf.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -430,13 +430,12 @@ xfs_attr3_leaf_read(
430430
struct xfs_trans *tp,
431431
struct xfs_inode *dp,
432432
xfs_dablk_t bno,
433-
xfs_daddr_t mappedbno,
434433
struct xfs_buf **bpp)
435434
{
436435
int err;
437436

438-
err = xfs_da_read_buf(tp, dp, bno, mappedbno, bpp,
439-
XFS_ATTR_FORK, &xfs_attr3_leaf_buf_ops);
437+
err = xfs_da_read_buf(tp, dp, bno, -1, bpp, XFS_ATTR_FORK,
438+
&xfs_attr3_leaf_buf_ops);
440439
if (!err && tp && *bpp)
441440
xfs_trans_buf_set_type(tp, *bpp, XFS_BLFT_ATTR_LEAF_BUF);
442441
return err;
@@ -1159,7 +1158,7 @@ xfs_attr3_leaf_to_node(
11591158
error = xfs_da_grow_inode(args, &blkno);
11601159
if (error)
11611160
goto out;
1162-
error = xfs_attr3_leaf_read(args->trans, dp, 0, -1, &bp1);
1161+
error = xfs_attr3_leaf_read(args->trans, dp, 0, &bp1);
11631162
if (error)
11641163
goto out;
11651164

@@ -1996,7 +1995,7 @@ xfs_attr3_leaf_toosmall(
19961995
if (blkno == 0)
19971996
continue;
19981997
error = xfs_attr3_leaf_read(state->args->trans, state->args->dp,
1999-
blkno, -1, &bp);
1998+
blkno, &bp);
20001999
if (error)
20012000
return error;
20022001

@@ -2732,7 +2731,7 @@ xfs_attr3_leaf_clearflag(
27322731
/*
27332732
* Set up the operation.
27342733
*/
2735-
error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp);
2734+
error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, &bp);
27362735
if (error)
27372736
return error;
27382737

@@ -2799,7 +2798,7 @@ xfs_attr3_leaf_setflag(
27992798
/*
28002799
* Set up the operation.
28012800
*/
2802-
error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp);
2801+
error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, &bp);
28032802
if (error)
28042803
return error;
28052804

@@ -2861,7 +2860,7 @@ xfs_attr3_leaf_flipflags(
28612860
/*
28622861
* Read the block containing the "old" attr
28632862
*/
2864-
error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, -1, &bp1);
2863+
error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno, &bp1);
28652864
if (error)
28662865
return error;
28672866

@@ -2870,7 +2869,7 @@ xfs_attr3_leaf_flipflags(
28702869
*/
28712870
if (args->blkno2 != args->blkno) {
28722871
error = xfs_attr3_leaf_read(args->trans, args->dp, args->blkno2,
2873-
-1, &bp2);
2872+
&bp2);
28742873
if (error)
28752874
return error;
28762875
} else {

fs/xfs/libxfs/xfs_attr_leaf.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ int xfs_attr_leaf_order(struct xfs_buf *leaf1_bp,
108108
struct xfs_buf *leaf2_bp);
109109
int xfs_attr_leaf_newentsize(struct xfs_da_args *args, int *local);
110110
int xfs_attr3_leaf_read(struct xfs_trans *tp, struct xfs_inode *dp,
111-
xfs_dablk_t bno, xfs_daddr_t mappedbno,
112-
struct xfs_buf **bpp);
111+
xfs_dablk_t bno, struct xfs_buf **bpp);
113112
void xfs_attr3_leaf_hdr_from_disk(struct xfs_da_geometry *geo,
114113
struct xfs_attr3_icleaf_hdr *to,
115114
struct xfs_attr_leafblock *from);

fs/xfs/xfs_attr_list.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,8 @@ xfs_attr_node_list(
377377
break;
378378
cursor->blkno = leafhdr.forw;
379379
xfs_trans_brelse(context->tp, bp);
380-
error = xfs_attr3_leaf_read(context->tp, dp, cursor->blkno, -1, &bp);
380+
error = xfs_attr3_leaf_read(context->tp, dp, cursor->blkno,
381+
&bp);
381382
if (error)
382383
return error;
383384
}
@@ -495,7 +496,7 @@ xfs_attr_leaf_list(xfs_attr_list_context_t *context)
495496
trace_xfs_attr_leaf_list(context);
496497

497498
context->cursor->blkno = 0;
498-
error = xfs_attr3_leaf_read(context->tp, context->dp, 0, -1, &bp);
499+
error = xfs_attr3_leaf_read(context->tp, context->dp, 0, &bp);
499500
if (error)
500501
return error;
501502

0 commit comments

Comments
 (0)