Skip to content

Commit 44e1f90

Browse files
Christoph Hellwigcmaiolino
authored andcommitted
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 <[email protected]> Reviewed-by: Carlos Maiolino <[email protected]> Signed-off-by: Carlos Maiolino <[email protected]>
1 parent 5abea70 commit 44e1f90

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

fs/xfs/xfs_buf.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -88,23 +88,14 @@ xfs_buf_stale(
8888
spin_unlock(&bp->b_lock);
8989
}
9090

91-
static void
92-
xfs_buf_free_maps(
93-
struct xfs_buf *bp)
94-
{
95-
if (bp->b_maps != &bp->__b_map) {
96-
kfree(bp->b_maps);
97-
bp->b_maps = NULL;
98-
}
99-
}
100-
10191
static void
10292
xfs_buf_free_callback(
10393
struct callback_head *cb)
10494
{
10595
struct xfs_buf *bp = container_of(cb, struct xfs_buf, b_rcu);
10696

107-
xfs_buf_free_maps(bp);
97+
if (bp->b_maps != &bp->__b_map)
98+
kfree(bp->b_maps);
10899
kmem_cache_free(xfs_buf_cache, bp);
109100
}
110101

0 commit comments

Comments
 (0)