summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_da_format.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-11-08 15:05:37 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2019-11-10 16:54:23 -0800
commit7e8ae7bd1c5d806316e6b6403ac2dd0be7a1f82b (patch)
tree5f666554ae7524606cbf22ab4a12aafc96b27cde /fs/xfs/libxfs/xfs_da_format.c
parentfdbb8c5b805c19bc2764aa1b91952e75e4c1c086 (diff)
downloadlinux-7e8ae7bd1c5d806316e6b6403ac2dd0be7a1f82b.tar.gz
linux-7e8ae7bd1c5d806316e6b6403ac2dd0be7a1f82b.tar.bz2
linux-7e8ae7bd1c5d806316e6b6403ac2dd0be7a1f82b.zip
xfs: devirtualize ->data_entry_tag_p
Replace the ->data_entry_tag_p dir ops method with a directly called xfs_dir2_data_entry_tag_p helper that takes care of the differences between the directory format with and without the file type field. 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/libxfs/xfs_da_format.c')
-rw-r--r--fs/xfs/libxfs/xfs_da_format.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/fs/xfs/libxfs/xfs_da_format.c b/fs/xfs/libxfs/xfs_da_format.c
index e4498bd0d6c0..483f4ab6abb8 100644
--- a/fs/xfs/libxfs/xfs_da_format.c
+++ b/fs/xfs/libxfs/xfs_da_format.c
@@ -89,25 +89,6 @@ xfs_dir3_data_put_ftype(
dep->name[dep->namelen] = type;
}
-/*
- * Pointer to an entry's tag word.
- */
-static __be16 *
-xfs_dir2_data_entry_tag_p(
- struct xfs_dir2_data_entry *dep)
-{
- return (__be16 *)((char *)dep +
- XFS_DIR2_DATA_ENTSIZE(dep->namelen) - sizeof(__be16));
-}
-
-static __be16 *
-xfs_dir3_data_entry_tag_p(
- struct xfs_dir2_data_entry *dep)
-{
- return (__be16 *)((char *)dep +
- XFS_DIR3_DATA_ENTSIZE(dep->namelen) - sizeof(__be16));
-}
-
static struct xfs_dir2_data_free *
xfs_dir2_data_bestfree_p(struct xfs_dir2_data_hdr *hdr)
{
@@ -123,7 +104,6 @@ xfs_dir3_data_bestfree_p(struct xfs_dir2_data_hdr *hdr)
static const struct xfs_dir_ops xfs_dir2_ops = {
.data_get_ftype = xfs_dir2_data_get_ftype,
.data_put_ftype = xfs_dir2_data_put_ftype,
- .data_entry_tag_p = xfs_dir2_data_entry_tag_p,
.data_bestfree_p = xfs_dir2_data_bestfree_p,
.data_first_offset = sizeof(struct xfs_dir2_data_hdr) +
@@ -135,7 +115,6 @@ static const struct xfs_dir_ops xfs_dir2_ops = {
static const struct xfs_dir_ops xfs_dir2_ftype_ops = {
.data_get_ftype = xfs_dir3_data_get_ftype,
.data_put_ftype = xfs_dir3_data_put_ftype,
- .data_entry_tag_p = xfs_dir3_data_entry_tag_p,
.data_bestfree_p = xfs_dir2_data_bestfree_p,
.data_first_offset = sizeof(struct xfs_dir2_data_hdr) +
@@ -147,7 +126,6 @@ static const struct xfs_dir_ops xfs_dir2_ftype_ops = {
static const struct xfs_dir_ops xfs_dir3_ops = {
.data_get_ftype = xfs_dir3_data_get_ftype,
.data_put_ftype = xfs_dir3_data_put_ftype,
- .data_entry_tag_p = xfs_dir3_data_entry_tag_p,
.data_bestfree_p = xfs_dir3_data_bestfree_p,
.data_first_offset = sizeof(struct xfs_dir3_data_hdr) +