From: Brian Foster Date: Wed, 28 Aug 2019 16:08:08 +0000 (-0400) Subject: xfs: always update params on small allocation X-Git-Tag: v5.3.0-rc1~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2d7ea81f0e47daaca269ba9722d61930104a6ba2;p=thirdparty%2Fxfsprogs-dev.git xfs: always update params on small allocation Source kernel commit: 7e36a3a63d3e480e75b4991aa983d4059ca5d401 xfs_alloc_ag_vextent_small() doesn't update the output parameters in the event of an AGFL allocation. Instead, it updates the xfs_alloc_arg structure directly to complete the allocation. Update both args and the output params to provide consistent behavior for future callers. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_alloc.c b/libxfs/xfs_alloc.c index 6e5d02c8f..2cc7561e6 100644 --- a/libxfs/xfs_alloc.c +++ b/libxfs/xfs_alloc.c @@ -754,8 +754,8 @@ xfs_alloc_ag_vextent_small( } xfs_trans_binval(args->tp, bp); } - args->len = 1; - args->agbno = fbno; + *fbnop = args->agbno = fbno; + *flenp = args->len = 1; XFS_WANT_CORRUPTED_GOTO(args->mp, fbno < be32_to_cpu(XFS_BUF_TO_AGF(args->agbp)->agf_length), error);