From: Kaixu Xia Date: Thu, 23 Apr 2020 04:54:31 +0000 (-0700) Subject: xfs: remove unnecessary check of the variable resblks in xfs_symlink X-Git-Tag: v5.10.7~2318^2~122 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=57fd2d8f61a2bc4d7b465588ca1a2217cd94076c;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- diff --git a/fs/xfs/xfs_symlink.c b/fs/xfs/xfs_symlink.c index 13fb4b9..9734419 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);