summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2_leaf.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2014-06-06 15:04:41 +1000
committerDave Chinner <david@fromorbit.com>2014-06-06 15:04:41 +1000
commit8c44a28561625d36591cc1540eb5f9033a9d1815 (patch)
tree4bf831c715077399594467d874d7320f6730407b /fs/xfs/xfs_dir2_leaf.c
parent892e3f342f9888066f1ce56f3683572f0ca9b8e9 (diff)
downloadtalos-obmc-linux-8c44a28561625d36591cc1540eb5f9033a9d1815.tar.gz
talos-obmc-linux-8c44a28561625d36591cc1540eb5f9033a9d1815.zip
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_leaf.c')
-rw-r--r--fs/xfs/xfs_dir2_leaf.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/xfs/xfs_dir2_leaf.c b/fs/xfs/xfs_dir2_leaf.c
index f571723e2378..dc4ef19365b8 100644
--- a/fs/xfs/xfs_dir2_leaf.c
+++ b/fs/xfs/xfs_dir2_leaf.c
@@ -347,8 +347,8 @@ xfs_dir3_leaf_get_buf(
int error;
ASSERT(magic == XFS_DIR2_LEAF1_MAGIC || magic == XFS_DIR2_LEAFN_MAGIC);
- ASSERT(bno >= XFS_DIR2_LEAF_FIRSTDB(mp) &&
- bno < XFS_DIR2_FREE_FIRSTDB(mp));
+ ASSERT(bno >= xfs_dir2_byte_to_db(mp, XFS_DIR2_LEAF_OFFSET) &&
+ bno < xfs_dir2_byte_to_db(mp, XFS_DIR2_FREE_OFFSET));
error = xfs_da_get_buf(tp, dp, xfs_dir2_db_to_da(mp, bno), -1, &bp,
XFS_DATA_FORK);
@@ -404,7 +404,7 @@ xfs_dir2_block_to_leaf(
return error;
}
ldb = xfs_dir2_da_to_db(mp, blkno);
- ASSERT(ldb == XFS_DIR2_LEAF_FIRSTDB(mp));
+ ASSERT(ldb == xfs_dir2_byte_to_db(mp, XFS_DIR2_LEAF_OFFSET));
/*
* Initialize the leaf block, get a buffer for it.
*/
@@ -1798,7 +1798,8 @@ xfs_dir2_node_to_leaf(
/*
* Get rid of the freespace block.
*/
- error = xfs_dir2_shrink_inode(args, XFS_DIR2_FREE_FIRSTDB(mp), fbp);
+ error = xfs_dir2_shrink_inode(args,
+ xfs_dir2_byte_to_db(mp, XFS_DIR2_FREE_OFFSET), fbp);
if (error) {
/*
* This can't fail here because it can only happen when
OpenPOWER on IntegriCloud