Skip to content

Commit

Permalink
btrfs: fix slab cache flags for free space tree bitmap
Browse files Browse the repository at this point in the history
The free space tree bitmap slab cache is created with SLAB_RED_ZONE but
that's a debugging flag and not always enabled. Also the other slabs are
created with at least SLAB_MEM_SPREAD that we want as well to average
the memory placement cost.

Reported-by: Vlastimil Babka <[email protected]>
Fixes: 3acd485 ("btrfs: fix allocation of free space cache v1 bitmap pages")
CC: [email protected] # 5.4+
Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
kdave committed Mar 16, 2021
1 parent 60484cd commit 34e4999
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -9005,7 +9005,7 @@ int __init btrfs_init_cachep(void)

btrfs_free_space_bitmap_cachep = kmem_cache_create("btrfs_free_space_bitmap",
PAGE_SIZE, PAGE_SIZE,
SLAB_RED_ZONE, NULL);
SLAB_MEM_SPREAD, NULL);
if (!btrfs_free_space_bitmap_cachep)
goto fail;

Expand Down

0 comments on commit 34e4999

Please sign in to comment.