]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: remove unnecessary check
authorDan Carpenter <dan.carpenter@linaro.org>
Mon, 21 Oct 2024 00:10:45 +0000 (17:10 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 31 Oct 2024 22:45:03 +0000 (15:45 -0700)
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 <dan.carpenter@linaro.org>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
libxfs/xfs_inode_util.c

index 74d2b5960bf0f22dcf4c85ef3142a46ce93b5969..92bfdf0715f02ef05ca5ff958e716d1416ac1611 100644 (file)
@@ -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;