summaryrefslogtreecommitdiff
path: root/fs/xfs
diff options
context:
space:
mode:
authorKaixu Xia <kaixuxia@tencent.com>2020-03-27 18:28:39 +0300
committerDarrick J. Wong <darrick.wong@oracle.com>2020-03-28 19:40:11 +0300
commit63337b63e7dab667bc0b4c3d468eb7e0dcf5f384 (patch)
tree1965fd2760cd77677f16b7db5e88e0f918ecec7e /fs/xfs
parent5cc3c006eb45524860c4d1dd4dd7ad4a506bf3f5 (diff)
downloadlinux-63337b63e7dab667bc0b4c3d468eb7e0dcf5f384.tar.xz
xfs: remove unnecessary ternary from xfs_create
Since the "no-allocation" reservations for file creations has been removed, the resblks value should be larger than zero, so remove unnecessary ternary conditional. Signed-off-by: Kaixu Xia <kaixuxia@tencent.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> [darrick: s/judgment/ternary/] Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_inode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 5c930863ed5b..0cac0d37e3ae 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1200,8 +1200,7 @@ xfs_create(
unlock_dp_on_error = false;
error = xfs_dir_createname(tp, dp, name, ip->i_ino,
- resblks ?
- resblks - XFS_IALLOC_SPACE_RES(mp) : 0);
+ resblks - XFS_IALLOC_SPACE_RES(mp));
if (error) {
ASSERT(error != -ENOSPC);
goto out_trans_cancel;