diff options
author | Christoph Hellwig <hch@lst.de> | 2016-11-24 11:39:44 +1100 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-11-24 11:39:44 +1100 |
commit | 65c5f419788d623a0410eca1866134f5e4628594 (patch) | |
tree | 7b4d2c91663af5d6b89a6ca3c265693a73b66bc0 /fs/xfs/libxfs/xfs_bmap.c | |
parent | 7efc794561f6bfe34d26c3724289108f6cda3a4d (diff) | |
download | lwn-65c5f419788d623a0410eca1866134f5e4628594.tar.gz lwn-65c5f419788d623a0410eca1866134f5e4628594.zip |
xfs: remove prev argument to xfs_bmapi_reserve_delalloc
We can easily lookup the previous extent for the cases where we need it,
which saves the callers from looking it up for us later in the series.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_bmap.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_bmap.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index 05608faa28ce..6af34b734ce8 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c @@ -4235,7 +4235,6 @@ xfs_bmapi_reserve_delalloc( xfs_fileoff_t aoff, xfs_filblks_t len, struct xfs_bmbt_irec *got, - struct xfs_bmbt_irec *prev, xfs_extnum_t *lastx, int eof) { @@ -4257,7 +4256,12 @@ xfs_bmapi_reserve_delalloc( else extsz = xfs_get_extsz_hint(ip); if (extsz) { - error = xfs_bmap_extsize_align(mp, got, prev, extsz, rt, eof, + struct xfs_bmbt_irec prev; + + if (!xfs_iext_get_extent(ifp, *lastx - 1, &prev)) + prev.br_startoff = NULLFILEOFF; + + error = xfs_bmap_extsize_align(mp, got, &prev, extsz, rt, eof, 1, 0, &aoff, &alen); ASSERT(!error); } |