diff options
| author | Christoph Hellwig <[email protected]> | 2025-03-17 05:48:34 +0000 |
|---|---|---|
| committer | Carlos Maiolino <[email protected]> | 2025-03-18 13:47:45 +0000 |
| commit | 44e1f90b1605e22634416b60e86f70d704894719 (patch) | |
| tree | 2b7cd00a3f4b5ff5e933426c284c10674c80dc1d | |
| parent | xfs: remove xfs_buf_get_maps (diff) | |
| download | kernel-44e1f90b1605e22634416b60e86f70d704894719.tar.gz kernel-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 <[email protected]>
Reviewed-by: Carlos Maiolino <[email protected]>
Signed-off-by: Carlos Maiolino <[email protected]>
| -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); } |
