Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vfs: remove SLAB_MEM_SPREAD flag usage

The SLAB_MEM_SPREAD flag used to be implemented in SLAB, which was
removed as of v6.8-rc1 (see [1]), so it became a dead flag since the
commit 16a1d968358a ("mm/slab: remove mm/slab.c and slab_def.h"). And
the series[1] went on to mark it obsolete explicitly to avoid confusion
for users. Here we can just remove all its users, which has no any
functional change.

Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
Link: https://lore.kernel.org/all/20240223-slab-cleanup-flags-v2-1-02f1753e8303@suse.cz [1]
Link: https://lore.kernel.org/r/20240224135315.830477-1-chengming.zhou@linux.dev
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Chengming Zhou and committed by
Christian Brauner
c997d683 5916f439

+4 -5
+1 -1
fs/buffer.c
··· 3122 3122 int ret; 3123 3123 3124 3124 bh_cachep = KMEM_CACHE(buffer_head, 3125 - SLAB_RECLAIM_ACCOUNT|SLAB_PANIC|SLAB_MEM_SPREAD); 3125 + SLAB_RECLAIM_ACCOUNT|SLAB_PANIC); 3126 3126 /* 3127 3127 * Limit the bh occupancy to 10% of ZONE_NORMAL 3128 3128 */
+1 -1
fs/dcache.c
··· 3136 3136 * of the dcache. 3137 3137 */ 3138 3138 dentry_cache = KMEM_CACHE_USERCOPY(dentry, 3139 - SLAB_RECLAIM_ACCOUNT|SLAB_PANIC|SLAB_MEM_SPREAD|SLAB_ACCOUNT, 3139 + SLAB_RECLAIM_ACCOUNT|SLAB_PANIC|SLAB_ACCOUNT, 3140 3140 d_iname); 3141 3141 3142 3142 /* Hash may have been set up in dcache_init_early */
+1 -1
fs/inode.c
··· 2286 2286 sizeof(struct inode), 2287 2287 0, 2288 2288 (SLAB_RECLAIM_ACCOUNT|SLAB_PANIC| 2289 - SLAB_MEM_SPREAD|SLAB_ACCOUNT), 2289 + SLAB_ACCOUNT), 2290 2290 init_once); 2291 2291 2292 2292 /* Hash may have been set up in inode_init_early */
+1 -2
fs/mbcache.c
··· 426 426 427 427 static int __init mbcache_init(void) 428 428 { 429 - mb_entry_cache = KMEM_CACHE(mb_cache_entry, 430 - SLAB_RECLAIM_ACCOUNT | SLAB_MEM_SPREAD); 429 + mb_entry_cache = KMEM_CACHE(mb_cache_entry, SLAB_RECLAIM_ACCOUNT); 431 430 if (!mb_entry_cache) 432 431 return -ENOMEM; 433 432 return 0;