* [PATCH] fs/fat: Remove unnecessary wrapper fat_max_cache()
@ 2025-11-27 17:54 Lalit Shankar Chowdhury
2025-11-28 3:52 ` OGAWA Hirofumi
0 siblings, 1 reply; 2+ messages in thread
From: Lalit Shankar Chowdhury @ 2025-11-27 17:54 UTC (permalink / raw)
To: hirofumi; +Cc: linux-kernel, Lalit Shankar Chowdhury
fat_max_cache() always returned FAT_MAX_CACHE and did not use the inode
parameter. So, use the FAT_MAX_CACHE constant directly.
Signed-off-by: Lalit Shankar Chowdhury <lalitshankarch@gmail.com>
---
fs/fat/cache.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/fs/fat/cache.c b/fs/fat/cache.c
index 2af424e200b3..630f3056658e 100644
--- a/fs/fat/cache.c
+++ b/fs/fat/cache.c
@@ -29,11 +29,6 @@ struct fat_cache_id {
int dcluster;
};
-static inline int fat_max_cache(struct inode *inode)
-{
- return FAT_MAX_CACHE;
-}
-
static struct kmem_cache *fat_cache_cachep;
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);
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++;
spin_unlock(&MSDOS_I(inode)->cache_lru_lock);
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fs/fat: Remove unnecessary wrapper fat_max_cache()
2025-11-27 17:54 [PATCH] fs/fat: Remove unnecessary wrapper fat_max_cache() Lalit Shankar Chowdhury
@ 2025-11-28 3:52 ` OGAWA Hirofumi
0 siblings, 0 replies; 2+ messages in thread
From: OGAWA Hirofumi @ 2025-11-28 3:52 UTC (permalink / raw)
To: Lalit Shankar Chowdhury; +Cc: Andrew Morton, linux-kernel
Lalit Shankar Chowdhury <lalitshankarch@gmail.com> writes:
> fat_max_cache() always returned FAT_MAX_CACHE and did not use the inode
> parameter. So, use the FAT_MAX_CACHE constant directly.
>
> Signed-off-by: Lalit Shankar Chowdhury <lalitshankarch@gmail.com>
Looks good.
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
> ---
> fs/fat/cache.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/fs/fat/cache.c b/fs/fat/cache.c
> index 2af424e200b3..630f3056658e 100644
> --- a/fs/fat/cache.c
> +++ b/fs/fat/cache.c
> @@ -29,11 +29,6 @@ struct fat_cache_id {
> int dcluster;
> };
>
> -static inline int fat_max_cache(struct inode *inode)
> -{
> - return FAT_MAX_CACHE;
> -}
> -
> static struct kmem_cache *fat_cache_cachep;
>
> 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);
> 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++;
> spin_unlock(&MSDOS_I(inode)->cache_lru_lock);
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-28 3:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-27 17:54 [PATCH] fs/fat: Remove unnecessary wrapper fat_max_cache() Lalit Shankar Chowdhury
2025-11-28 3:52 ` OGAWA Hirofumi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®