]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
xfs: remove xfs_buf_free_maps
authorChristoph Hellwig <hch@lst.de>
Mon, 17 Mar 2025 05:48:34 +0000 (06:48 +0100)
committerCarlos Maiolino <cem@kernel.org>
Tue, 18 Mar 2025 13:47:45 +0000 (14:47 +0100)
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>
fs/xfs/xfs_buf.c

index 878dc0f108d16332e19579fc451c425c83733cf3..bf75964bbfe8ef57f9258da7ac7d735469363a9c 100644 (file)
@@ -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);
 }