On Fri, Mar 27, 2020 at 01:45:56PM +0800, xiakaixu1987@xxxxxxxxx wrote: > From: Kaixu Xia <kaixuxia@xxxxxxxxxxx> > > Since the "no-allocation" reservations for file creations has > been removed, the resblks value should be larger than zero, so > remove unnecessary judgment. > > Signed-off-by: Kaixu Xia <kaixuxia@xxxxxxxxxxx> Seems reasonable, will test all this... Reviewed-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> --D > --- > fs/xfs/xfs_inode.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c > index c5077e6..e41bddf 100644 > --- a/fs/xfs/xfs_inode.c > +++ b/fs/xfs/xfs_inode.c > @@ -1219,8 +1219,7 @@ > unlock_dp_on_error = false; > > error = xfs_dir_createname(tp, dp, name, ip->i_ino, > - resblks ? > - resblks - XFS_IALLOC_SPACE_RES(mp) : 0); > + resblks - XFS_IALLOC_SPACE_RES(mp)); > if (error) { > ASSERT(error != -ENOSPC); > goto out_trans_cancel; > -- > 1.8.3.1 >