diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-02-22 12:35:19 -0800 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-02-22 12:35:19 -0800 |
commit | 11388f6581f40e7d5a69ce5f8b13264eca7c2c5c (patch) | |
tree | fff9a5dfe40b2434c1d6001804e5f9e5bf38b9f2 /fs | |
parent | 7771f7030007e3faa6906864d01b504b590e1ca2 (diff) | |
download | linux-stable-11388f6581f40e7d5a69ce5f8b13264eca7c2c5c.tar.gz linux-stable-11388f6581f40e7d5a69ce5f8b13264eca7c2c5c.tar.bz2 linux-stable-11388f6581f40e7d5a69ce5f8b13264eca7c2c5c.zip |
xfs: remove the unnecessary daddr paramter to _init_block
Now that all of the callers pass XFS_BUF_DADDR_NULL as the daddr
parameter, we can elide that too.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/libxfs/xfs_bmap_btree.c | 4 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_btree.c | 19 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_btree.h | 2 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_btree_staging.c | 5 |
4 files changed, 21 insertions, 9 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap_btree.c b/fs/xfs/libxfs/xfs_bmap_btree.c index ddaf40e0f309..fa116c2d13ae 100644 --- a/fs/xfs/libxfs/xfs_bmap_btree.c +++ b/fs/xfs/libxfs/xfs_bmap_btree.c @@ -38,8 +38,8 @@ xfs_bmbt_init_block( xfs_btree_init_buf(ip->i_mount, bp, &xfs_bmbt_ops, level, numrecs, ip->i_ino); else - xfs_btree_init_block(ip->i_mount, buf, &xfs_bmbt_ops, - XFS_BUF_DADDR_NULL, level, numrecs, ip->i_ino); + xfs_btree_init_block(ip->i_mount, buf, &xfs_bmbt_ops, level, + numrecs, ip->i_ino); } /* diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c index f1db5118dbaa..b5b9b021c67a 100644 --- a/fs/xfs/libxfs/xfs_btree.c +++ b/fs/xfs/libxfs/xfs_btree.c @@ -1153,8 +1153,8 @@ xfs_btree_set_sibling( } } -void -xfs_btree_init_block( +static void +__xfs_btree_init_block( struct xfs_mount *mp, struct xfs_btree_block *buf, const struct xfs_btree_ops *ops, @@ -1196,6 +1196,19 @@ xfs_btree_init_block( } void +xfs_btree_init_block( + struct xfs_mount *mp, + struct xfs_btree_block *block, + const struct xfs_btree_ops *ops, + __u16 level, + __u16 numrecs, + __u64 owner) +{ + __xfs_btree_init_block(mp, block, ops, XFS_BUF_DADDR_NULL, level, + numrecs, owner); +} + +void xfs_btree_init_buf( struct xfs_mount *mp, struct xfs_buf *bp, @@ -1204,7 +1217,7 @@ xfs_btree_init_buf( __u16 numrecs, __u64 owner) { - xfs_btree_init_block(mp, XFS_BUF_TO_BLOCK(bp), ops, + __xfs_btree_init_block(mp, XFS_BUF_TO_BLOCK(bp), ops, xfs_buf_daddr(bp), level, numrecs, owner); } diff --git a/fs/xfs/libxfs/xfs_btree.h b/fs/xfs/libxfs/xfs_btree.h index 56901d2591ed..80be40ca8954 100644 --- a/fs/xfs/libxfs/xfs_btree.h +++ b/fs/xfs/libxfs/xfs_btree.h @@ -440,7 +440,7 @@ void xfs_btree_init_buf(struct xfs_mount *mp, struct xfs_buf *bp, __u64 owner); void xfs_btree_init_block(struct xfs_mount *mp, struct xfs_btree_block *buf, const struct xfs_btree_ops *ops, - xfs_daddr_t blkno, __u16 level, __u16 numrecs, __u64 owner); + __u16 level, __u16 numrecs, __u64 owner); /* * Common btree core entry points. diff --git a/fs/xfs/libxfs/xfs_btree_staging.c b/fs/xfs/libxfs/xfs_btree_staging.c index b590f4580a6d..e31e4bd21718 100644 --- a/fs/xfs/libxfs/xfs_btree_staging.c +++ b/fs/xfs/libxfs/xfs_btree_staging.c @@ -410,9 +410,8 @@ xfs_btree_bload_prep_block( ifp->if_broot_bytes = (int)new_size; /* Initialize it and send it out. */ - xfs_btree_init_block(cur->bc_mp, ifp->if_broot, - cur->bc_ops, XFS_BUF_DADDR_NULL, level, - nr_this_block, cur->bc_ino.ip->i_ino); + xfs_btree_init_block(cur->bc_mp, ifp->if_broot, cur->bc_ops, + level, nr_this_block, cur->bc_ino.ip->i_ino); *bpp = NULL; *blockp = ifp->if_broot; |