From: Dan Carpenter Date: Mon, 21 Oct 2024 00:10:45 +0000 (-0700) Subject: xfs: remove unnecessary check X-Git-Tag: v6.12.0~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0e955beedcb8d45b0f9f82d9f894a84a0547ff29;p=thirdparty%2Fxfsprogs-dev.git xfs: remove unnecessary check Source kernel commit: fb8b941c75bd70ddfb0a8a3bb9bb770ed1d648f8 We checked that "pip" is non-NULL at the start of the if else statement so there is no need to check again here. Delete the check. Signed-off-by: Dan Carpenter Reviewed-by: Darrick J. Wong Reviewed-by: Chaitanya Kulkarni Signed-off-by: Chandan Babu R --- diff --git a/libxfs/xfs_inode_util.c b/libxfs/xfs_inode_util.c index 74d2b596..92bfdf07 100644 --- a/libxfs/xfs_inode_util.c +++ b/libxfs/xfs_inode_util.c @@ -305,7 +305,7 @@ xfs_inode_init( !vfsgid_in_group_p(i_gid_into_vfsgid(args->idmap, inode))) inode->i_mode &= ~S_ISGID; - ip->i_projid = pip ? xfs_get_initial_prid(pip) : 0; + ip->i_projid = xfs_get_initial_prid(pip); } ip->i_disk_size = 0;