diff options
author | Christoph Hellwig <hch@lst.de> | 2025-03-17 06:48:34 +0100 |
---|---|---|
committer | Carlos Maiolino <cem@kernel.org> | 2025-03-18 14:47:45 +0100 |
commit | 44e1f90b1605e22634416b60e86f70d704894719 (patch) | |
tree | 2b7cd00a3f4b5ff5e933426c284c10674c80dc1d | |
parent | 5abea7094bdff895c6f9e579745ecd9883bfb231 (diff) | |
download | linux-44e1f90b1605e22634416b60e86f70d704894719.tar.gz linux-44e1f90b1605e22634416b60e86f70d704894719.tar.bz2 linux-44e1f90b1605e22634416b60e86f70d704894719.zip |
xfs: remove xfs_buf_free_maps
xfs_buf_free_maps only has a single caller, so open code it there. Stop
zeroing the b_maps pointer as the buffer is freed in the next line.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
-rw-r--r-- | fs/xfs/xfs_buf.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 878dc0f108d1..bf75964bbfe8 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -89,22 +89,13 @@ xfs_buf_stale( } static void -xfs_buf_free_maps( - struct xfs_buf *bp) -{ - if (bp->b_maps != &bp->__b_map) { - kfree(bp->b_maps); - bp->b_maps = NULL; - } -} - -static void xfs_buf_free_callback( struct callback_head *cb) { struct xfs_buf *bp = container_of(cb, struct xfs_buf, b_rcu); - xfs_buf_free_maps(bp); + if (bp->b_maps != &bp->__b_map) + kfree(bp->b_maps); kmem_cache_free(xfs_buf_cache, bp); } |