diff options
author | Dave Chinner <dchinner@redhat.com> | 2014-06-06 15:04:41 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-06-06 15:04:41 +1000 |
commit | 8c44a28561625d36591cc1540eb5f9033a9d1815 (patch) | |
tree | 4bf831c715077399594467d874d7320f6730407b /fs/xfs/xfs_dir2_node.c | |
parent | 892e3f342f9888066f1ce56f3683572f0ca9b8e9 (diff) | |
download | linux-8c44a28561625d36591cc1540eb5f9033a9d1815.tar.bz2 |
xfs: kill XFS_DIR2...FIRSTDB macros
They are just simple wrappers around xfs_dir2_byte_to_db(), and
we've already removed one usage earlier in the patch set. Kill
the rest before we start removing the xfs_mount from conversion
functions.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_dir2_node.c')
-rw-r--r-- | fs/xfs/xfs_dir2_node.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c index 9cb91ee0914b..1bcaaa0ffdbd 100644 --- a/fs/xfs/xfs_dir2_node.c +++ b/fs/xfs/xfs_dir2_node.c @@ -315,7 +315,7 @@ xfs_dir2_leaf_to_node( if ((error = xfs_dir2_grow_inode(args, XFS_DIR2_FREE_SPACE, &fdb))) { return error; } - ASSERT(fdb == XFS_DIR2_FREE_FIRSTDB(mp)); + ASSERT(fdb == xfs_dir2_byte_to_db(mp, XFS_DIR2_FREE_OFFSET)); /* * Get the buffer for the new freespace block. */ @@ -1256,7 +1256,7 @@ xfs_dir2_leafn_remove( struct xfs_dir3_icfree_hdr freehdr; dp->d_ops->free_hdr_from_disk(&freehdr, free); ASSERT(freehdr.firstdb == dp->d_ops->free_max_bests(mp) * - (fdb - XFS_DIR2_FREE_FIRSTDB(mp))); + (fdb - xfs_dir2_byte_to_db(mp, XFS_DIR2_FREE_OFFSET))); } #endif /* @@ -1747,7 +1747,8 @@ xfs_dir2_node_addname_int( * us a freespace block to start with. */ if (++fbno == 0) - fbno = XFS_DIR2_FREE_FIRSTDB(mp); + fbno = xfs_dir2_byte_to_db(mp, + XFS_DIR2_FREE_OFFSET); /* * If it's ifbno we already looked at it. */ @@ -1887,7 +1888,9 @@ xfs_dir2_node_addname_int( /* * Remember the first slot as our empty slot. */ - freehdr.firstdb = (fbno - XFS_DIR2_FREE_FIRSTDB(mp)) * + freehdr.firstdb = + (fbno - xfs_dir2_byte_to_db(mp, + XFS_DIR2_FREE_OFFSET)) * dp->d_ops->free_max_bests(mp); } else { free = fbp->b_addr; |