summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_dir2_readdir.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-11-08 15:05:38 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2019-11-10 16:54:24 -0800
commitd73e1cee8add0d18d5401b81db2351b9e8af899a (patch)
tree39a4acff9e46ddeb6a4350b08036335268309485 /fs/xfs/xfs_dir2_readdir.c
parent7e8ae7bd1c5d806316e6b6403ac2dd0be7a1f82b (diff)
xfs: move the dir2 data block fixed offsets to struct xfs_da_geometry
Move the data block fixed offsets towards our structure for dir/attr geometry parameters. Signed-off-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/xfs_dir2_readdir.c')
-rw-r--r--fs/xfs/xfs_dir2_readdir.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/xfs_dir2_readdir.c b/fs/xfs/xfs_dir2_readdir.c
index edc57bed0f1f..a893d2d09620 100644
--- a/fs/xfs/xfs_dir2_readdir.c
+++ b/fs/xfs/xfs_dir2_readdir.c
@@ -75,9 +75,9 @@ xfs_dir2_sf_getdents(
* entries for "." and "..".
*/
dot_offset = xfs_dir2_db_off_to_dataptr(geo, geo->datablk,
- dp->d_ops->data_entry_offset);
+ geo->data_entry_offset);
dotdot_offset = xfs_dir2_db_off_to_dataptr(geo, geo->datablk,
- dp->d_ops->data_entry_offset +
+ geo->data_entry_offset +
xfs_dir2_data_entsize(mp, sizeof(".") - 1));
/*
@@ -174,7 +174,7 @@ xfs_dir2_block_getdents(
* Loop over the data portion of the block.
* Each object is a real entry (dep) or an unused one (dup).
*/
- offset = dp->d_ops->data_entry_offset;
+ offset = geo->data_entry_offset;
end = xfs_dir3_data_end_offset(geo, bp->b_addr);
while (offset < end) {
struct xfs_dir2_data_unused *dup = bp->b_addr + offset;
@@ -401,13 +401,13 @@ xfs_dir2_leaf_getdents(
/*
* Find our position in the block.
*/
- offset = dp->d_ops->data_entry_offset;
+ offset = geo->data_entry_offset;
byteoff = xfs_dir2_byte_to_off(geo, curoff);
/*
* Skip past the header.
*/
if (byteoff == 0)
- curoff += dp->d_ops->data_entry_offset;
+ curoff += geo->data_entry_offset;
/*
* Skip past entries until we reach our offset.
*/