On Sat, Apr 18, 2020 at 01:30:51PM +0800, xiakaixu1987@xxxxxxxxx wrote: > From: Kaixu Xia <kaixuxia@xxxxxxxxxxx> > > 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@xxxxxxxxxxx> Seems fine to me... Reviewed-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> --D > --- > fs/xfs/xfs_symlink.c | 6 ++---- > 1 file 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); > > -- > 2.20.0 >