[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <98779b7b-757e-3dd7-d3da-8306da4fa9e7@oracle.com>
Date: Tue, 19 Jan 2021 10:46:39 -0800
From: Mike Kravetz <mike.kravetz@...cle.com>
To: Miaohe Lin <linmiaohe@...wei.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v2] hugetlbfs: Remove useless BUG_ON(!inode) in
hugetlbfs_setattr()
CC Andrew
On 1/18/21 3:07 AM, Miaohe Lin wrote:
> When we reach here with inode = NULL, we should have crashed as inode has
> already been dereferenced via hstate_inode. So this BUG_ON(!inode) does not
> take effect and should be removed.
>
> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
> ---
> fs/hugetlbfs/inode.c | 2 --
> 1 file changed, 2 deletions(-)
Thanks,
Reviewed-by: Mike Kravetz <mike.kravetz@...cle.com>
--
Mike Kravetz
>
> diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
> index 016c863b493b..79464963f95e 100644
> --- a/fs/hugetlbfs/inode.c
> +++ b/fs/hugetlbfs/inode.c
> @@ -759,8 +759,6 @@ static int hugetlbfs_setattr(struct dentry *dentry, struct iattr *attr)
> unsigned int ia_valid = attr->ia_valid;
> struct hugetlbfs_inode_info *info = HUGETLBFS_I(inode);
>
> - BUG_ON(!inode);
> -
> error = setattr_prepare(dentry, attr);
> if (error)
> return error;
>
Powered by blists - more mailing lists