summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2019-06-12 12:00:00 -0400
committerDarrick J. Wong <darrick.wong@oracle.com>2019-06-12 12:00:00 -0400
commitf5b999c03f4c178d151e79803a95f8482a26521e (patch)
tree7505f9724d6196065495cdc8ed9f78de9f22e0fd
parent76dee76921e138d93dba7aaabece13f2c3c1219f (diff)
xfs: remove unused flag arguments
There are several functions which take a flag argument that is only ever passed as "0," so remove these arguments. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Bill O'Donnell <billodo@redhat.com> Reviewed-by: Allison Collins <allison.henderson@oracle.com> 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_ag.c8
-rw-r--r--fs/xfs/libxfs/xfs_alloc.c4
-rw-r--r--fs/xfs/libxfs/xfs_attr_remote.c2
-rw-r--r--fs/xfs/libxfs/xfs_bmap.c14
-rw-r--r--fs/xfs/libxfs/xfs_btree.c30
-rw-r--r--fs/xfs/libxfs/xfs_btree.h10
-rw-r--r--fs/xfs/libxfs/xfs_sb.c2
-rw-r--r--fs/xfs/scrub/repair.c2
-rw-r--r--fs/xfs/xfs_bmap_util.c6
-rw-r--r--fs/xfs/xfs_buf.h5
10 files changed, 35 insertions, 48 deletions
diff --git a/fs/xfs/libxfs/xfs_ag.c b/fs/xfs/libxfs/xfs_ag.c
index b0c89f54d1bb..5efb82744664 100644
--- a/fs/xfs/libxfs/xfs_ag.c
+++ b/fs/xfs/libxfs/xfs_ag.c
@@ -53,7 +53,7 @@ xfs_btroot_init(
53 struct xfs_buf *bp, 53 struct xfs_buf *bp,
54 struct aghdr_init_data *id) 54 struct aghdr_init_data *id)
55{ 55{
56 xfs_btree_init_block(mp, bp, id->type, 0, 0, id->agno, 0); 56 xfs_btree_init_block(mp, bp, id->type, 0, 0, id->agno);
57} 57}
58 58
59/* 59/*
@@ -67,7 +67,7 @@ xfs_bnoroot_init(
67{ 67{
68 struct xfs_alloc_rec *arec; 68 struct xfs_alloc_rec *arec;
69 69
70 xfs_btree_init_block(mp, bp, XFS_BTNUM_BNO, 0, 1, id->agno, 0); 70 xfs_btree_init_block(mp, bp, XFS_BTNUM_BNO, 0, 1, id->agno);
71 arec = XFS_ALLOC_REC_ADDR(mp, XFS_BUF_TO_BLOCK(bp), 1); 71 arec = XFS_ALLOC_REC_ADDR(mp, XFS_BUF_TO_BLOCK(bp), 1);
72 arec->ar_startblock = cpu_to_be32(mp->m_ag_prealloc_blocks); 72 arec->ar_startblock = cpu_to_be32(mp->m_ag_prealloc_blocks);
73 arec->ar_blockcount = cpu_to_be32(id->agsize - 73 arec->ar_blockcount = cpu_to_be32(id->agsize -
@@ -82,7 +82,7 @@ xfs_cntroot_init(
82{ 82{
83 struct xfs_alloc_rec *arec; 83 struct xfs_alloc_rec *arec;
84 84
85 xfs_btree_init_block(mp, bp, XFS_BTNUM_CNT, 0, 1, id->agno, 0); 85 xfs_btree_init_block(mp, bp, XFS_BTNUM_CNT, 0, 1, id->agno);
86 arec = XFS_ALLOC_REC_ADDR(mp, XFS_BUF_TO_BLOCK(bp), 1); 86 arec = XFS_ALLOC_REC_ADDR(mp, XFS_BUF_TO_BLOCK(bp), 1);
87 arec->ar_startblock = cpu_to_be32(mp->m_ag_prealloc_blocks); 87 arec->ar_startblock = cpu_to_be32(mp->m_ag_prealloc_blocks);
88 arec->ar_blockcount = cpu_to_be32(id->agsize - 88 arec->ar_blockcount = cpu_to_be32(id->agsize -
@@ -101,7 +101,7 @@ xfs_rmaproot_init(
101 struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp); 101 struct xfs_btree_block *block = XFS_BUF_TO_BLOCK(bp);
102 struct xfs_rmap_rec *rrec; 102 struct xfs_rmap_rec *rrec;
103 103
104 xfs_btree_init_block(mp, bp, XFS_BTNUM_RMAP, 0, 4, id->agno, 0); 104 xfs_btree_init_block(mp, bp, XFS_BTNUM_RMAP, 0, 4, id->agno);
105 105
106 /* 106 /*
107 * mark the AG header regions as static metadata The BNO 107 * mark the AG header regions as static metadata The BNO
diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c
index a9ff3cf82cce..dbbff823d9e2 100644
--- a/fs/xfs/libxfs/xfs_alloc.c
+++ b/fs/xfs/libxfs/xfs_alloc.c
@@ -1627,7 +1627,7 @@ xfs_alloc_ag_vextent_small(
1627 xfs_buf_t *bp; 1627 xfs_buf_t *bp;
1628 1628
1629 bp = xfs_btree_get_bufs(args->mp, args->tp, 1629 bp = xfs_btree_get_bufs(args->mp, args->tp,
1630 args->agno, fbno, 0); 1630 args->agno, fbno);
1631 if (!bp) { 1631 if (!bp) {
1632 error = -EFSCORRUPTED; 1632 error = -EFSCORRUPTED;
1633 goto error0; 1633 goto error0;
@@ -2095,7 +2095,7 @@ xfs_free_agfl_block(
2095 if (error) 2095 if (error)
2096 return error; 2096 return error;
2097 2097
2098 bp = xfs_btree_get_bufs(tp->t_mountp, tp, agno, agbno, 0); 2098 bp = xfs_btree_get_bufs(tp->t_mountp, tp, agno, agbno);
2099 if (!bp) 2099 if (!bp)
2100 return -EFSCORRUPTED; 2100 return -EFSCORRUPTED;
2101 xfs_trans_binval(tp, bp); 2101 xfs_trans_binval(tp, bp);
diff --git a/fs/xfs/libxfs/xfs_attr_remote.c b/fs/xfs/libxfs/xfs_attr_remote.c
index 65ff600a8067..8b47f9110ddd 100644
--- a/fs/xfs/libxfs/xfs_attr_remote.c
+++ b/fs/xfs/libxfs/xfs_attr_remote.c
@@ -535,7 +535,7 @@ xfs_attr_rmtval_set(
535 dblkno = XFS_FSB_TO_DADDR(mp, map.br_startblock), 535 dblkno = XFS_FSB_TO_DADDR(mp, map.br_startblock),
536 dblkcnt = XFS_FSB_TO_BB(mp, map.br_blockcount); 536 dblkcnt = XFS_FSB_TO_BB(mp, map.br_blockcount);
537 537
538 bp = xfs_buf_get(mp->m_ddev_targp, dblkno, dblkcnt, 0); 538 bp = xfs_buf_get(mp->m_ddev_targp, dblkno, dblkcnt);
539 if (!bp) 539 if (!bp)
540 return -ENOMEM; 540 return -ENOMEM;
541 bp->b_ops = &xfs_attr3_rmt_buf_ops; 541 bp->b_ops = &xfs_attr3_rmt_buf_ops;
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index 356ebd1cbe82..4133bc461e3e 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -370,7 +370,7 @@ xfs_bmap_check_leaf_extents(
370 bp = xfs_bmap_get_bp(cur, XFS_FSB_TO_DADDR(mp, bno)); 370 bp = xfs_bmap_get_bp(cur, XFS_FSB_TO_DADDR(mp, bno));
371 if (!bp) { 371 if (!bp) {
372 bp_release = 1; 372 bp_release = 1;
373 error = xfs_btree_read_bufl(mp, NULL, bno, 0, &bp, 373 error = xfs_btree_read_bufl(mp, NULL, bno, &bp,
374 XFS_BMAP_BTREE_REF, 374 XFS_BMAP_BTREE_REF,
375 &xfs_bmbt_buf_ops); 375 &xfs_bmbt_buf_ops);
376 if (error) 376 if (error)
@@ -454,7 +454,7 @@ xfs_bmap_check_leaf_extents(
454 bp = xfs_bmap_get_bp(cur, XFS_FSB_TO_DADDR(mp, bno)); 454 bp = xfs_bmap_get_bp(cur, XFS_FSB_TO_DADDR(mp, bno));
455 if (!bp) { 455 if (!bp) {
456 bp_release = 1; 456 bp_release = 1;
457 error = xfs_btree_read_bufl(mp, NULL, bno, 0, &bp, 457 error = xfs_btree_read_bufl(mp, NULL, bno, &bp,
458 XFS_BMAP_BTREE_REF, 458 XFS_BMAP_BTREE_REF,
459 &xfs_bmbt_buf_ops); 459 &xfs_bmbt_buf_ops);
460 if (error) 460 if (error)
@@ -619,7 +619,7 @@ xfs_bmap_btree_to_extents(
619 XFS_WANT_CORRUPTED_RETURN(cur->bc_mp, 619 XFS_WANT_CORRUPTED_RETURN(cur->bc_mp,
620 xfs_btree_check_lptr(cur, cbno, 1)); 620 xfs_btree_check_lptr(cur, cbno, 1));
621#endif 621#endif
622 error = xfs_btree_read_bufl(mp, tp, cbno, 0, &cbp, XFS_BMAP_BTREE_REF, 622 error = xfs_btree_read_bufl(mp, tp, cbno, &cbp, XFS_BMAP_BTREE_REF,
623 &xfs_bmbt_buf_ops); 623 &xfs_bmbt_buf_ops);
624 if (error) 624 if (error)
625 return error; 625 return error;
@@ -732,7 +732,7 @@ xfs_bmap_extents_to_btree(
732 cur->bc_private.b.allocated++; 732 cur->bc_private.b.allocated++;
733 ip->i_d.di_nblocks++; 733 ip->i_d.di_nblocks++;
734 xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, 1L); 734 xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, 1L);
735 abp = xfs_btree_get_bufl(mp, tp, args.fsbno, 0); 735 abp = xfs_btree_get_bufl(mp, tp, args.fsbno);
736 if (!abp) { 736 if (!abp) {
737 error = -EFSCORRUPTED; 737 error = -EFSCORRUPTED;
738 goto out_unreserve_dquot; 738 goto out_unreserve_dquot;
@@ -878,7 +878,7 @@ xfs_bmap_local_to_extents(
878 ASSERT(args.fsbno != NULLFSBLOCK); 878 ASSERT(args.fsbno != NULLFSBLOCK);
879 ASSERT(args.len == 1); 879 ASSERT(args.len == 1);
880 tp->t_firstblock = args.fsbno; 880 tp->t_firstblock = args.fsbno;
881 bp = xfs_btree_get_bufl(args.mp, tp, args.fsbno, 0); 881 bp = xfs_btree_get_bufl(args.mp, tp, args.fsbno);
882 882
883 /* 883 /*
884 * Initialize the block, copy the data and log the remote buffer. 884 * Initialize the block, copy the data and log the remote buffer.
@@ -1203,7 +1203,7 @@ xfs_iread_extents(
1203 * pointer (leftmost) at each level. 1203 * pointer (leftmost) at each level.
1204 */ 1204 */
1205 while (level-- > 0) { 1205 while (level-- > 0) {
1206 error = xfs_btree_read_bufl(mp, tp, bno, 0, &bp, 1206 error = xfs_btree_read_bufl(mp, tp, bno, &bp,
1207 XFS_BMAP_BTREE_REF, &xfs_bmbt_buf_ops); 1207 XFS_BMAP_BTREE_REF, &xfs_bmbt_buf_ops);
1208 if (error) 1208 if (error)
1209 goto out; 1209 goto out;
@@ -1276,7 +1276,7 @@ xfs_iread_extents(
1276 */ 1276 */
1277 if (bno == NULLFSBLOCK) 1277 if (bno == NULLFSBLOCK)
1278 break; 1278 break;
1279 error = xfs_btree_read_bufl(mp, tp, bno, 0, &bp, 1279 error = xfs_btree_read_bufl(mp, tp, bno, &bp,
1280 XFS_BMAP_BTREE_REF, &xfs_bmbt_buf_ops); 1280 XFS_BMAP_BTREE_REF, &xfs_bmbt_buf_ops);
1281 if (error) 1281 if (error)
1282 goto out; 1282 goto out;
diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c
index bbdae2b4559f..7d3d7c42da40 100644
--- a/fs/xfs/libxfs/xfs_btree.c
+++ b/fs/xfs/libxfs/xfs_btree.c
@@ -691,14 +691,13 @@ xfs_buf_t * /* buffer for fsbno */
691xfs_btree_get_bufl( 691xfs_btree_get_bufl(
692 xfs_mount_t *mp, /* file system mount point */ 692 xfs_mount_t *mp, /* file system mount point */
693 xfs_trans_t *tp, /* transaction pointer */ 693 xfs_trans_t *tp, /* transaction pointer */
694 xfs_fsblock_t fsbno, /* file system block number */ 694 xfs_fsblock_t fsbno) /* file system block number */
695 uint lock) /* lock flags for get_buf */
696{ 695{
697 xfs_daddr_t d; /* real disk block address */ 696 xfs_daddr_t d; /* real disk block address */
698 697
699 ASSERT(fsbno != NULLFSBLOCK); 698 ASSERT(fsbno != NULLFSBLOCK);
700 d = XFS_FSB_TO_DADDR(mp, fsbno); 699 d = XFS_FSB_TO_DADDR(mp, fsbno);
701 return xfs_trans_get_buf(tp, mp->m_ddev_targp, d, mp->m_bsize, lock); 700 return xfs_trans_get_buf(tp, mp->m_ddev_targp, d, mp->m_bsize, 0);
702} 701}
703 702
704/* 703/*
@@ -710,15 +709,14 @@ xfs_btree_get_bufs(
710 xfs_mount_t *mp, /* file system mount point */ 709 xfs_mount_t *mp, /* file system mount point */
711 xfs_trans_t *tp, /* transaction pointer */ 710 xfs_trans_t *tp, /* transaction pointer */
712 xfs_agnumber_t agno, /* allocation group number */ 711 xfs_agnumber_t agno, /* allocation group number */
713 xfs_agblock_t agbno, /* allocation group block number */ 712 xfs_agblock_t agbno) /* allocation group block number */
714 uint lock) /* lock flags for get_buf */
715{ 713{
716 xfs_daddr_t d; /* real disk block address */ 714 xfs_daddr_t d; /* real disk block address */
717 715
718 ASSERT(agno != NULLAGNUMBER); 716 ASSERT(agno != NULLAGNUMBER);
719 ASSERT(agbno != NULLAGBLOCK); 717 ASSERT(agbno != NULLAGBLOCK);
720 d = XFS_AGB_TO_DADDR(mp, agno, agbno); 718 d = XFS_AGB_TO_DADDR(mp, agno, agbno);
721 return xfs_trans_get_buf(tp, mp->m_ddev_targp, d, mp->m_bsize, lock); 719 return xfs_trans_get_buf(tp, mp->m_ddev_targp, d, mp->m_bsize, 0);
722} 720}
723 721
724/* 722/*
@@ -845,7 +843,6 @@ xfs_btree_read_bufl(
845 struct xfs_mount *mp, /* file system mount point */ 843 struct xfs_mount *mp, /* file system mount point */
846 struct xfs_trans *tp, /* transaction pointer */ 844 struct xfs_trans *tp, /* transaction pointer */
847 xfs_fsblock_t fsbno, /* file system block number */ 845 xfs_fsblock_t fsbno, /* file system block number */
848 uint lock, /* lock flags for read_buf */
849 struct xfs_buf **bpp, /* buffer for fsbno */ 846 struct xfs_buf **bpp, /* buffer for fsbno */
850 int refval, /* ref count value for buffer */ 847 int refval, /* ref count value for buffer */
851 const struct xfs_buf_ops *ops) 848 const struct xfs_buf_ops *ops)
@@ -858,7 +855,7 @@ xfs_btree_read_bufl(
858 return -EFSCORRUPTED; 855 return -EFSCORRUPTED;
859 d = XFS_FSB_TO_DADDR(mp, fsbno); 856 d = XFS_FSB_TO_DADDR(mp, fsbno);
860 error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, d, 857 error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, d,
861 mp->m_bsize, lock, &bp, ops); 858 mp->m_bsize, 0, &bp, ops);
862 if (error) 859 if (error)
863 return error; 860 return error;
864 if (bp) 861 if (bp)
@@ -1185,11 +1182,10 @@ xfs_btree_init_block(
1185 xfs_btnum_t btnum, 1182 xfs_btnum_t btnum,
1186 __u16 level, 1183 __u16 level,
1187 __u16 numrecs, 1184 __u16 numrecs,
1188 __u64 owner, 1185 __u64 owner)
1189 unsigned int flags)
1190{ 1186{
1191 xfs_btree_init_block_int(mp, XFS_BUF_TO_BLOCK(bp), bp->b_bn, 1187 xfs_btree_init_block_int(mp, XFS_BUF_TO_BLOCK(bp), bp->b_bn,
1192 btnum, level, numrecs, owner, flags); 1188 btnum, level, numrecs, owner, 0);
1193} 1189}
1194 1190
1195STATIC void 1191STATIC void
@@ -1288,7 +1284,6 @@ STATIC int
1288xfs_btree_get_buf_block( 1284xfs_btree_get_buf_block(
1289 struct xfs_btree_cur *cur, 1285 struct xfs_btree_cur *cur,
1290 union xfs_btree_ptr *ptr, 1286 union xfs_btree_ptr *ptr,
1291 int flags,
1292 struct xfs_btree_block **block, 1287 struct xfs_btree_block **block,
1293 struct xfs_buf **bpp) 1288 struct xfs_buf **bpp)
1294{ 1289{
@@ -1296,14 +1291,11 @@ xfs_btree_get_buf_block(
1296 xfs_daddr_t d; 1291 xfs_daddr_t d;
1297 int error; 1292 int error;
1298 1293
1299 /* need to sort out how callers deal with failures first */
1300 ASSERT(!(flags & XBF_TRYLOCK));
1301
1302 error = xfs_btree_ptr_to_daddr(cur, ptr, &d); 1294 error = xfs_btree_ptr_to_daddr(cur, ptr, &d);
1303 if (error) 1295 if (error)
1304 return error; 1296 return error;
1305 *bpp = xfs_trans_get_buf(cur->bc_tp, mp->m_ddev_targp, d, 1297 *bpp = xfs_trans_get_buf(cur->bc_tp, mp->m_ddev_targp, d,
1306 mp->m_bsize, flags); 1298 mp->m_bsize, 0);
1307 1299
1308 if (!*bpp) 1300 if (!*bpp)
1309 return -ENOMEM; 1301 return -ENOMEM;
@@ -2706,7 +2698,7 @@ __xfs_btree_split(
2706 XFS_BTREE_STATS_INC(cur, alloc); 2698 XFS_BTREE_STATS_INC(cur, alloc);
2707 2699
2708 /* Set up the new block as "right". */ 2700 /* Set up the new block as "right". */
2709 error = xfs_btree_get_buf_block(cur, &rptr, 0, &right, &rbp); 2701 error = xfs_btree_get_buf_block(cur, &rptr, &right, &rbp);
2710 if (error) 2702 if (error)
2711 goto error0; 2703 goto error0;
2712 2704
@@ -2961,7 +2953,7 @@ xfs_btree_new_iroot(
2961 XFS_BTREE_STATS_INC(cur, alloc); 2953 XFS_BTREE_STATS_INC(cur, alloc);
2962 2954
2963 /* Copy the root into a real block. */ 2955 /* Copy the root into a real block. */
2964 error = xfs_btree_get_buf_block(cur, &nptr, 0, &cblock, &cbp); 2956 error = xfs_btree_get_buf_block(cur, &nptr, &cblock, &cbp);
2965 if (error) 2957 if (error)
2966 goto error0; 2958 goto error0;
2967 2959
@@ -3058,7 +3050,7 @@ xfs_btree_new_root(
3058 XFS_BTREE_STATS_INC(cur, alloc); 3050 XFS_BTREE_STATS_INC(cur, alloc);
3059 3051
3060 /* Set up the new block. */ 3052 /* Set up the new block. */
3061 error = xfs_btree_get_buf_block(cur, &lptr, 0, &new, &nbp); 3053 error = xfs_btree_get_buf_block(cur, &lptr, &new, &nbp);
3062 if (error) 3054 if (error)
3063 goto error0; 3055 goto error0;
3064 3056
diff --git a/fs/xfs/libxfs/xfs_btree.h b/fs/xfs/libxfs/xfs_btree.h
index e3b3e9dce5da..8d2b250c6828 100644
--- a/fs/xfs/libxfs/xfs_btree.h
+++ b/fs/xfs/libxfs/xfs_btree.h
@@ -301,8 +301,7 @@ struct xfs_buf * /* buffer for fsbno */
301xfs_btree_get_bufl( 301xfs_btree_get_bufl(
302 struct xfs_mount *mp, /* file system mount point */ 302 struct xfs_mount *mp, /* file system mount point */
303 struct xfs_trans *tp, /* transaction pointer */ 303 struct xfs_trans *tp, /* transaction pointer */
304 xfs_fsblock_t fsbno, /* file system block number */ 304 xfs_fsblock_t fsbno); /* file system block number */
305 uint lock); /* lock flags for get_buf */
306 305
307/* 306/*
308 * Get a buffer for the block, return it with no data read. 307 * Get a buffer for the block, return it with no data read.
@@ -313,8 +312,7 @@ xfs_btree_get_bufs(
313 struct xfs_mount *mp, /* file system mount point */ 312 struct xfs_mount *mp, /* file system mount point */
314 struct xfs_trans *tp, /* transaction pointer */ 313 struct xfs_trans *tp, /* transaction pointer */
315 xfs_agnumber_t agno, /* allocation group number */ 314 xfs_agnumber_t agno, /* allocation group number */
316 xfs_agblock_t agbno, /* allocation group block number */ 315 xfs_agblock_t agbno); /* allocation group block number */
317 uint lock); /* lock flags for get_buf */
318 316
319/* 317/*
320 * Check for the cursor referring to the last block at the given level. 318 * Check for the cursor referring to the last block at the given level.
@@ -345,7 +343,6 @@ xfs_btree_read_bufl(
345 struct xfs_mount *mp, /* file system mount point */ 343 struct xfs_mount *mp, /* file system mount point */
346 struct xfs_trans *tp, /* transaction pointer */ 344 struct xfs_trans *tp, /* transaction pointer */
347 xfs_fsblock_t fsbno, /* file system block number */ 345 xfs_fsblock_t fsbno, /* file system block number */
348 uint lock, /* lock flags for read_buf */
349 struct xfs_buf **bpp, /* buffer for fsbno */ 346 struct xfs_buf **bpp, /* buffer for fsbno */
350 int refval, /* ref count value for buffer */ 347 int refval, /* ref count value for buffer */
351 const struct xfs_buf_ops *ops); 348 const struct xfs_buf_ops *ops);
@@ -383,8 +380,7 @@ xfs_btree_init_block(
383 xfs_btnum_t btnum, 380 xfs_btnum_t btnum,
384 __u16 level, 381 __u16 level,
385 __u16 numrecs, 382 __u16 numrecs,
386 __u64 owner, 383 __u64 owner);
387 unsigned int flags);
388 384
389void 385void
390xfs_btree_init_block_int( 386xfs_btree_init_block_int(
diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c
index c808fd649880..326872eced21 100644
--- a/fs/xfs/libxfs/xfs_sb.c
+++ b/fs/xfs/libxfs/xfs_sb.c
@@ -993,7 +993,7 @@ xfs_update_secondary_sbs(
993 993
994 bp = xfs_buf_get(mp->m_ddev_targp, 994 bp = xfs_buf_get(mp->m_ddev_targp,
995 XFS_AG_DADDR(mp, agno, XFS_SB_DADDR), 995 XFS_AG_DADDR(mp, agno, XFS_SB_DADDR),
996 XFS_FSS_TO_BB(mp, 1), 0); 996 XFS_FSS_TO_BB(mp, 1));
997 /* 997 /*
998 * If we get an error reading or writing alternate superblocks, 998 * If we get an error reading or writing alternate superblocks,
999 * continue. xfs_repair chooses the "best" superblock based 999 * continue. xfs_repair chooses the "best" superblock based
diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c
index eb358f0f5e0a..e710005a0c9e 100644
--- a/fs/xfs/scrub/repair.c
+++ b/fs/xfs/scrub/repair.c
@@ -357,7 +357,7 @@ xrep_init_btblock(
357 bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, XFS_FSB_TO_DADDR(mp, fsb), 357 bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, XFS_FSB_TO_DADDR(mp, fsb),
358 XFS_FSB_TO_BB(mp, 1), 0); 358 XFS_FSB_TO_BB(mp, 1), 0);
359 xfs_buf_zero(bp, 0, BBTOB(bp->b_length)); 359 xfs_buf_zero(bp, 0, BBTOB(bp->b_length));
360 xfs_btree_init_block(mp, bp, btnum, 0, 0, sc->sa.agno, 0); 360 xfs_btree_init_block(mp, bp, btnum, 0, 0, sc->sa.agno);
361 xfs_trans_buf_set_type(tp, bp, XFS_BLFT_BTREE_BUF); 361 xfs_trans_buf_set_type(tp, bp, XFS_BLFT_BTREE_BUF);
362 xfs_trans_log_buf(tp, bp, 0, bp->b_length); 362 xfs_trans_log_buf(tp, bp, 0, bp->b_length);
363 bp->b_ops = ops; 363 bp->b_ops = ops;
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index 06d07f1e310b..b8fa6d337413 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -276,7 +276,7 @@ xfs_bmap_count_tree(
276 struct xfs_btree_block *block, *nextblock; 276 struct xfs_btree_block *block, *nextblock;
277 int numrecs; 277 int numrecs;
278 278
279 error = xfs_btree_read_bufl(mp, tp, bno, 0, &bp, XFS_BMAP_BTREE_REF, 279 error = xfs_btree_read_bufl(mp, tp, bno, &bp, XFS_BMAP_BTREE_REF,
280 &xfs_bmbt_buf_ops); 280 &xfs_bmbt_buf_ops);
281 if (error) 281 if (error)
282 return error; 282 return error;
@@ -287,7 +287,7 @@ xfs_bmap_count_tree(
287 /* Not at node above leaves, count this level of nodes */ 287 /* Not at node above leaves, count this level of nodes */
288 nextbno = be64_to_cpu(block->bb_u.l.bb_rightsib); 288 nextbno = be64_to_cpu(block->bb_u.l.bb_rightsib);
289 while (nextbno != NULLFSBLOCK) { 289 while (nextbno != NULLFSBLOCK) {
290 error = xfs_btree_read_bufl(mp, tp, nextbno, 0, &nbp, 290 error = xfs_btree_read_bufl(mp, tp, nextbno, &nbp,
291 XFS_BMAP_BTREE_REF, 291 XFS_BMAP_BTREE_REF,
292 &xfs_bmbt_buf_ops); 292 &xfs_bmbt_buf_ops);
293 if (error) 293 if (error)
@@ -321,7 +321,7 @@ xfs_bmap_count_tree(
321 if (nextbno == NULLFSBLOCK) 321 if (nextbno == NULLFSBLOCK)
322 break; 322 break;
323 bno = nextbno; 323 bno = nextbno;
324 error = xfs_btree_read_bufl(mp, tp, bno, 0, &bp, 324 error = xfs_btree_read_bufl(mp, tp, bno, &bp,
325 XFS_BMAP_BTREE_REF, 325 XFS_BMAP_BTREE_REF,
326 &xfs_bmbt_buf_ops); 326 &xfs_bmbt_buf_ops);
327 if (error) 327 if (error)
diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h
index 1701efee4fd4..517a3dcdec90 100644
--- a/fs/xfs/xfs_buf.h
+++ b/fs/xfs/xfs_buf.h
@@ -233,11 +233,10 @@ static inline struct xfs_buf *
233xfs_buf_get( 233xfs_buf_get(
234 struct xfs_buftarg *target, 234 struct xfs_buftarg *target,
235 xfs_daddr_t blkno, 235 xfs_daddr_t blkno,
236 size_t numblks, 236 size_t numblks)
237 xfs_buf_flags_t flags)
238{ 237{
239 DEFINE_SINGLE_BUF_MAP(map, blkno, numblks); 238 DEFINE_SINGLE_BUF_MAP(map, blkno, numblks);
240 return xfs_buf_get_map(target, &map, 1, flags); 239 return xfs_buf_get_map(target, &map, 1, 0);
241} 240}
242 241
243static inline struct xfs_buf * 242static inline struct xfs_buf *