Commit d51bafe0 authored by Kaixu Xia's avatar Kaixu Xia Committed by Darrick J. Wong
Browse files

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: default avatarKaixu Xia <kaixuxia@tencent.com>
Reviewed-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent c140735b
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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:
		 *