xfs: rearrange xfs_bmap_add_free parameters
This is already in xfsprogs' libxfs, so port it to the kernel. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:

committed by
Dave Chinner

parent
128f24d5d9
commit
59bad075bd
@@ -570,10 +570,10 @@ xfs_bmap_validate_ret(
|
||||
*/
|
||||
void
|
||||
xfs_bmap_add_free(
|
||||
struct xfs_mount *mp, /* mount point structure */
|
||||
struct xfs_bmap_free *flist, /* list of extents */
|
||||
xfs_fsblock_t bno, /* fs block number of extent */
|
||||
xfs_filblks_t len, /* length of extent */
|
||||
xfs_bmap_free_t *flist, /* list of extents */
|
||||
xfs_mount_t *mp) /* mount point structure */
|
||||
xfs_filblks_t len) /* length of extent */
|
||||
{
|
||||
xfs_bmap_free_item_t *cur; /* current (next) element */
|
||||
xfs_bmap_free_item_t *new; /* new element */
|
||||
@@ -699,7 +699,7 @@ xfs_bmap_btree_to_extents(
|
||||
cblock = XFS_BUF_TO_BLOCK(cbp);
|
||||
if ((error = xfs_btree_check_block(cur, cblock, 0, cbp)))
|
||||
return error;
|
||||
xfs_bmap_add_free(cbno, 1, cur->bc_private.b.flist, mp);
|
||||
xfs_bmap_add_free(mp, cur->bc_private.b.flist, cbno, 1);
|
||||
ip->i_d.di_nblocks--;
|
||||
xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, -1L);
|
||||
xfs_trans_binval(tp, cbp);
|
||||
@@ -5073,8 +5073,8 @@ xfs_bmap_del_extent(
|
||||
* If we need to, add to list of extents to delete.
|
||||
*/
|
||||
if (do_fx)
|
||||
xfs_bmap_add_free(del->br_startblock, del->br_blockcount, flist,
|
||||
mp);
|
||||
xfs_bmap_add_free(mp, flist, del->br_startblock,
|
||||
del->br_blockcount);
|
||||
/*
|
||||
* Adjust inode # blocks in the file.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user