From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Lalit Shankar Chowdhury <lalitshankarch@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs/fat: Remove unnecessary wrapper fat_max_cache()
Date: Fri, 28 Nov 2025 12:52:09 +0900 [thread overview]
Message-ID: <87qztireza.fsf@mail.parknet.co.jp> (raw)
In-Reply-To: <20251127175431.126516-1-lalitshankarch@gmail.com>
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>
prev parent reply other threads:[~2025-11-28 3:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-27 17:54 Lalit Shankar Chowdhury
2025-11-28 3:52 ` OGAWA Hirofumi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87qztireza.fsf@mail.parknet.co.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=akpm@linux-foundation.org \
--cc=lalitshankarch@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®