aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_symlink.c
diff options
context:
space:
mode:
authorKaixu Xia <kaixuxia@tencent.com>2020-04-22 21:54:31 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2020-05-04 09:03:15 -0700
commit57fd2d8f61a2bc4d7b465588ca1a2217cd94076c (patch)
treeb28f497db0485a3ce10e70ee0188d890a4799f2e /fs/xfs/xfs_symlink.c
parentxfs: simplify the flags setting in xfs_qm_scall_quotaon (diff)
downloadlinux-dev-57fd2d8f61a2bc4d7b465588ca1a2217cd94076c.tar.xz
linux-dev-57fd2d8f61a2bc4d7b465588ca1a2217cd94076c.zip
xfs: remove unnecessary check of the variable resblks in xfs_symlink
Since the "no-allocation" reservations has been removed, the resblks value should be larger than zero, so remove the unnecessary check. Signed-off-by: Kaixu Xia <kaixuxia@tencent.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_symlink.c')
-rw-r--r--fs/xfs/xfs_symlink.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/xfs/xfs_symlink.c b/fs/xfs/xfs_symlink.c
index 13fb4b919648..973441992b08 100644
--- a/fs/xfs/xfs_symlink.c
+++ b/fs/xfs/xfs_symlink.c
@@ -243,8 +243,7 @@ xfs_symlink(
*/
xfs_qm_vop_create_dqattach(tp, ip, udqp, gdqp, pdqp);
- if (resblks)
- resblks -= XFS_IALLOC_SPACE_RES(mp);
+ resblks -= XFS_IALLOC_SPACE_RES(mp);
/*
* If the symlink will fit into the inode, write it inline.
*/
@@ -265,8 +264,7 @@ xfs_symlink(
if (error)
goto out_trans_cancel;
- if (resblks)
- resblks -= fs_blocks;
+ resblks -= fs_blocks;
ip->i_d.di_size = pathlen;
xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);