summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2_readdir.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-11-09 00:02:38 +0100
committerDarrick J. Wong <darrick.wong@oracle.com>2019-11-11 01:54:21 +0100
commit50f6bb6b7aea8177110e55355c455f18912a7a73 (patch)
tree240846bba00aa22123a5f4df0390c8b49af22e20 /fs/xfs/xfs_dir2_readdir.c
parentxfs: devirtualize ->sf_get_parent_ino and ->sf_put_parent_ino (diff)
downloadlinux-50f6bb6b7aea8177110e55355c455f18912a7a73.tar.xz
linux-50f6bb6b7aea8177110e55355c455f18912a7a73.zip
xfs: devirtualize ->sf_entsize and ->sf_nextentry
Just check for file-type enabled directories directly. 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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/xfs/xfs_dir2_readdir.c b/fs/xfs/xfs_dir2_readdir.c
index 6f94d2a45174..7d150e914d00 100644
--- a/fs/xfs/xfs_dir2_readdir.c
+++ b/fs/xfs/xfs_dir2_readdir.c
@@ -48,6 +48,7 @@ xfs_dir2_sf_getdents(
{
int i; /* shortform entry number */
struct xfs_inode *dp = args->dp; /* incore directory inode */
+ struct xfs_mount *mp = dp->i_mount;
xfs_dir2_dataptr_t off; /* current entry's offset */
xfs_dir2_sf_entry_t *sfep; /* shortform directory entry */
xfs_dir2_sf_hdr_t *sfp; /* shortform structure */
@@ -109,7 +110,7 @@ xfs_dir2_sf_getdents(
xfs_dir2_sf_get_offset(sfep));
if (ctx->pos > off) {
- sfep = dp->d_ops->sf_nextentry(sfp, sfep);
+ sfep = xfs_dir2_sf_nextentry(mp, sfp, sfep);
continue;
}
@@ -122,9 +123,9 @@ xfs_dir2_sf_getdents(
return -EFSCORRUPTED;
}
if (!dir_emit(ctx, (char *)sfep->name, sfep->namelen, ino,
- xfs_dir3_get_dtype(dp->i_mount, filetype)))
+ xfs_dir3_get_dtype(mp, filetype)))
return 0;
- sfep = dp->d_ops->sf_nextentry(sfp, sfep);
+ sfep = xfs_dir2_sf_nextentry(mp, sfp, sfep);
}
ctx->pos = xfs_dir2_db_off_to_dataptr(geo, geo->datablk + 1, 0) &