Skip to content

Commit 63337b6

Browse files
kaixuxiakxdjwong
authored andcommitted
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>
1 parent 5cc3c00 commit 63337b6

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎fs/xfs/xfs_inode.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,8 +1200,7 @@ xfs_create(
12001200
unlock_dp_on_error = false;
12011201

12021202
error = xfs_dir_createname(tp, dp, name, ip->i_ino,
1203-
resblks ?
1204-
resblks - XFS_IALLOC_SPACE_RES(mp) : 0);
1203+
resblks - XFS_IALLOC_SPACE_RES(mp));
12051204
if (error) {
12061205
ASSERT(error != -ENOSPC);
12071206
goto out_trans_cancel;

0 commit comments

Comments
 (0)