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>pull/1354/merge
parent
d86fea4294
commit
acce46aaf8
|
|
@ -29,11 +29,6 @@ struct fat_cache_id {
|
||||||
int dcluster;
|
int dcluster;
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline int fat_max_cache(struct inode *inode)
|
|
||||||
{
|
|
||||||
return FAT_MAX_CACHE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct kmem_cache *fat_cache_cachep;
|
static struct kmem_cache *fat_cache_cachep;
|
||||||
|
|
||||||
static void init_once(void *foo)
|
static void init_once(void *foo)
|
||||||
|
|
@ -145,7 +140,7 @@ static void fat_cache_add(struct inode *inode, struct fat_cache_id *new)
|
||||||
|
|
||||||
cache = fat_cache_merge(inode, new);
|
cache = fat_cache_merge(inode, new);
|
||||||
if (cache == NULL) {
|
if (cache == NULL) {
|
||||||
if (MSDOS_I(inode)->nr_caches < fat_max_cache(inode)) {
|
if (MSDOS_I(inode)->nr_caches < FAT_MAX_CACHE) {
|
||||||
MSDOS_I(inode)->nr_caches++;
|
MSDOS_I(inode)->nr_caches++;
|
||||||
spin_unlock(&MSDOS_I(inode)->cache_lru_lock);
|
spin_unlock(&MSDOS_I(inode)->cache_lru_lock);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue