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 <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> [darrick: s/judgment/ternary/] Signed-off-by: Darrick J. Wong <[email protected]>
1 parent 5cc3c00 commit 63337b6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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)