From: Christoph Hellwig Date: Mon, 17 Mar 2025 05:48:34 +0000 (+0100) Subject: xfs: remove xfs_buf_free_maps X-Git-Tag: v6.15-rc1~149^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=44e1f90b1605e22634416b60e86f70d704894719;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Carlos Maiolino Signed-off-by: Carlos Maiolino --- diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 878dc0f108d16..bf75964bbfe8e 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -88,23 +88,14 @@ xfs_buf_stale( spin_unlock(&bp->b_lock); } -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); }