From: Mike Kravetz <mike.kravetz@oracle.com>
To: Miaohe Lin <linmiaohe@huawei.com>
Cc: akpm@linux-foundation.org, songmuchun@bytedance.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 5/5] hugetlbfs: fix inaccurate comment in hugetlbfs_statfs()
Date: Tue, 26 Jul 2022 14:20:35 -0700 [thread overview]
Message-ID: <YuBao9x/n6QTUWNC@monkey> (raw)
In-Reply-To: <20220726142918.51693-6-linmiaohe@huawei.com>
On 07/26/22 22:29, Miaohe Lin wrote:
> In some cases, e.g. when size option is not specified, f_blocks, f_bavail
> and f_bfree will be set to -1 instead of 0. Likewise, when nr_inodes isn't
> specified, f_files and f_ffree will be set to -1 too. Update the comment
> to make this clear.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
> fs/hugetlbfs/inode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks,
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
--
Mike Kravetz
>
> diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
> index 96c60aa3ab47..fe0e374b02a3 100644
> --- a/fs/hugetlbfs/inode.c
> +++ b/fs/hugetlbfs/inode.c
> @@ -1079,7 +1079,7 @@ static int hugetlbfs_statfs(struct dentry *dentry, struct kstatfs *buf)
> buf->f_bsize = huge_page_size(h);
> if (sbinfo) {
> spin_lock(&sbinfo->stat_lock);
> - /* If no limits set, just report 0 for max/free/used
> + /* If no limits set, just report 0 or -1 for max/free/used
> * blocks, like simple_statfs() */
> if (sbinfo->spool) {
> long free_pages;
> --
> 2.23.0
>
next prev parent reply other threads:[~2022-07-26 21:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-26 14:29 [PATCH v2 0/5] A few cleanup and fixup patches for hugetlbfs Miaohe Lin
2022-07-26 14:29 ` [PATCH v2 1/5] hugetlbfs: use helper macro SZ_1{K,M} Miaohe Lin
2022-07-27 6:43 ` Muchun Song
2022-07-26 14:29 ` [PATCH v2 2/5] hugetlbfs: remove unneeded hugetlbfs_ops forward declaration Miaohe Lin
2022-07-27 6:44 ` Muchun Song
2022-07-26 14:29 ` [PATCH v2 3/5] hugetlbfs: remove unneeded header file Miaohe Lin
2022-07-27 6:44 ` Muchun Song
2022-07-26 14:29 ` [PATCH v2 4/5] hugetlbfs: cleanup some comments in inode.c Miaohe Lin
2022-07-27 6:45 ` Muchun Song
2022-07-26 14:29 ` [PATCH v2 5/5] hugetlbfs: fix inaccurate comment in hugetlbfs_statfs() Miaohe Lin
2022-07-26 21:20 ` Mike Kravetz [this message]
2022-07-27 6:46 ` Muchun Song
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=YuBao9x/n6QTUWNC@monkey \
--to=mike.kravetz@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=songmuchun@bytedance.com \
/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