From 51e5b03c638cf1ce9ec64e7abadf6ac37013fab5 Mon Sep 17 00:00:00 2001 From: Brian Foster Date: Thu, 20 Jun 2019 21:52:23 -0700 Subject: xfs: always update params on small allocation 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 --- fs/xfs/libxfs/xfs_alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c index 5b0fadc34b83..6fc22b698230 100644 --- a/fs/xfs/libxfs/xfs_alloc.c +++ b/fs/xfs/libxfs/xfs_alloc.c @@ -758,8 +758,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); -- cgit v1.2.3