From: Kaixu Xia Date: Thu, 23 Apr 2020 04:54:28 +0000 (-0700) Subject: xfs: combine two if statements with same condition X-Git-Tag: v5.8-rc1~14^2~127 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=d51bafe0d227e9fef1b0ab4cc1a424d8e2b59218;p=linux-block.git xfs: combine two if statements with same condition The two if statements have same condition, and the mask value does not change in xfs_setattr_nonsize(), so combine them. Signed-off-by: Kaixu Xia Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index f7a99b3bbcf7..e34814590453 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c @@ -738,12 +738,7 @@ xfs_setattr_nonsize( if (error) /* out of quota */ goto out_cancel; } - } - /* - * Change file ownership. Must be the owner or privileged. - */ - if (mask & (ATTR_UID|ATTR_GID)) { /* * CAP_FSETID overrides the following restrictions: *