diff options
author | Christoph Hellwig <hch@lst.de> | 2019-11-09 00:05:30 +0100 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-11-11 01:54:22 +0100 |
commit | 2eb68a5d3619b80dec745f71df8af5f80cda16f8 (patch) | |
tree | f33cacfb5bd24e72490e22b443dd6ba8e672f8a3 /fs/xfs/xfs_dir2_readdir.c | |
parent | xfs: remove the data_dot_offset field in struct xfs_dir_ops (diff) | |
download | linux-2eb68a5d3619b80dec745f71df8af5f80cda16f8.tar.xz linux-2eb68a5d3619b80dec745f71df8af5f80cda16f8.zip |
xfs: remove the data_dotdot_offset field in struct xfs_dir_ops
The data_dotdot_offset value is always equal to data_entry_offset plus
the fixed size of the "." entry. Right now calculating that fixed size
requires an indirect call, but by the end of this series it will be
an inline function that can be constant folded.
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/xfs_dir2_readdir.c b/fs/xfs/xfs_dir2_readdir.c index 39985ca6ae2d..187bb51875c2 100644 --- a/fs/xfs/xfs_dir2_readdir.c +++ b/fs/xfs/xfs_dir2_readdir.c @@ -77,7 +77,8 @@ xfs_dir2_sf_getdents( dot_offset = xfs_dir2_db_off_to_dataptr(geo, geo->datablk, dp->d_ops->data_entry_offset); dotdot_offset = xfs_dir2_db_off_to_dataptr(geo, geo->datablk, - dp->d_ops->data_dotdot_offset); + dp->d_ops->data_entry_offset + + dp->d_ops->data_entsize(sizeof(".") - 1)); /* * Put . entry unless we're starting past it. |