]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: remove unnecessary check
authorDan Carpenter <dan.carpenter@linaro.org>
Fri, 12 Jul 2024 14:07:36 +0000 (09:07 -0500)
committerChandan Babu R <chandanbabu@kernel.org>
Tue, 3 Sep 2024 04:37:40 +0000 (10:07 +0530)
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>
fs/xfs/libxfs/xfs_inode_util.c

index 032333289113b7bdf657bdc68ef9592df85b9a64..cc38e1c3c3e1d37b754f0774b400c3299d6123e5 100644 (file)
@@ -308,7 +308,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;