lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YuBao9x/n6QTUWNC@monkey>
Date:   Tue, 26 Jul 2022 14:20:35 -0700
From:   Mike Kravetz <mike.kravetz@...cle.com>
To:     Miaohe Lin <linmiaohe@...wei.com>
Cc:     akpm@...ux-foundation.org, songmuchun@...edance.com,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 5/5] hugetlbfs: fix inaccurate comment in
 hugetlbfs_statfs()

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@...wei.com>
> ---
>  fs/hugetlbfs/inode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks,

Reviewed-by: Mike Kravetz <mike.kravetz@...cle.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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ