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

Configure Feed

Select the types of activity you want to include in your feed.

fs/fat: remove unnecessary wrapper fat_max_cache()

fat_max_cache() always returned FAT_MAX_CACHE and did not use the inode
parameter. So, use the FAT_MAX_CACHE constant directly.

Link: https://lkml.kernel.org/r/20251127175431.126516-1-lalitshankarch@gmail.com
Signed-off-by: Lalit Shankar Chowdhury <lalitshankarch@gmail.com>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Christian Brauner <brauner@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Lalit Shankar Chowdhury and committed by
Andrew Morton
acce46aa d86fea42

+1 -6
+1 -6
fs/fat/cache.c
··· 29 29 int dcluster; 30 30 }; 31 31 32 - static inline int fat_max_cache(struct inode *inode) 33 - { 34 - return FAT_MAX_CACHE; 35 - } 36 - 37 32 static struct kmem_cache *fat_cache_cachep; 38 33 39 34 static void init_once(void *foo) ··· 140 145 141 146 cache = fat_cache_merge(inode, new); 142 147 if (cache == NULL) { 143 - if (MSDOS_I(inode)->nr_caches < fat_max_cache(inode)) { 148 + if (MSDOS_I(inode)->nr_caches < FAT_MAX_CACHE) { 144 149 MSDOS_I(inode)->nr_caches++; 145 150 spin_unlock(&MSDOS_I(inode)->cache_lru_lock); 146 151