]> git.baikalelectronics.ru Git - kernel.git/commit
hugetlbfs: remove useless BUG_ON(!inode) in hugetlbfs_setattr()
authorMiaohe Lin <linmiaohe@huawei.com>
Wed, 24 Feb 2021 20:10:01 +0000 (12:10 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 24 Feb 2021 21:38:35 +0000 (13:38 -0800)
commit84126af98eecc240832bf09b422b8061072d7eb7
tree6befae289a5f85d4687d9f3fee5094785e8e93ea
parent728a4b1c7cb2ac97f3ddf31f8c3c7bda52b7def1
hugetlbfs: remove useless BUG_ON(!inode) in hugetlbfs_setattr()

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.

Link: https://lkml.kernel.org/r/20210118110700.52506-1-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/hugetlbfs/inode.c