aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2019-06-28 19:30:20 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2019-06-28 19:30:20 -0700
commit7e36a3a63d3e480e75b4991aa983d4059ca5d401 (patch)
treecff4317e2660eb0814a630e105adb296daba927f /fs/xfs/libxfs
parentxfs: skip small alloc cntbt logic on NULL cursor (diff)
downloadlinux-dev-7e36a3a63d3e480e75b4991aa983d4059ca5d401.tar.xz
linux-dev-7e36a3a63d3e480e75b4991aa983d4059ca5d401.zip
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 <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs')
-rw-r--r--fs/xfs/libxfs/xfs_alloc.c4
1 files 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);