From ee641d5af5e638d53d9bcde459836b1cb90f12e2 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Fri, 8 Nov 2019 15:05:31 -0800 Subject: xfs: remove the ->data_unused_p method Replace the two users of the ->data_unused_p dir ops method with a direct calculation using ->data_entry_offset, and clean them up a bit. xfs_dir2_sf_to_block already had an offset variable containing the value of ->data_entry_offset, which we are now reusing to make it clear that the initial freespace entry is at the same place that we later fill in the 1 entry, and in xfs_dir3_data_init the function is cleaned up a bit to keep the initialization of fields of a given structure close to each other, and to avoid a local variable. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- fs/xfs/libxfs/xfs_dir2.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'fs/xfs/libxfs/xfs_dir2.h') diff --git a/fs/xfs/libxfs/xfs_dir2.h b/fs/xfs/libxfs/xfs_dir2.h index 8bfcf4c1b9c4..75aec05aae10 100644 --- a/fs/xfs/libxfs/xfs_dir2.h +++ b/fs/xfs/libxfs/xfs_dir2.h @@ -45,8 +45,6 @@ struct xfs_dir_ops { struct xfs_dir2_data_entry * (*data_entry_p)(struct xfs_dir2_data_hdr *hdr); - struct xfs_dir2_data_unused * - (*data_unused_p)(struct xfs_dir2_data_hdr *hdr); }; extern const struct xfs_dir_ops * -- cgit