]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commitd0146756a0993d3a01407b38cd87d965ccda72c6
tree6befae289a5f85d4687d9f3fee5094785e8e93ea
parenta4fa34cdcd18296c097e2648fe894d28c5cf9709
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