]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs: remove the data_dotdot_offset field in struct xfs_dir_ops
authorChristoph Hellwig <hch@lst.de>
Wed, 22 Jan 2020 16:29:42 +0000 (11:29 -0500)
committerEric Sandeen <sandeen@redhat.com>
Wed, 22 Jan 2020 16:29:42 +0000 (11:29 -0500)
Source kernel commit: 2eb68a5d3619b80dec745f71df8af5f80cda16f8

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>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_da_format.c
libxfs/xfs_dir2.h

index dca138efccb24d33a50a16389e36149b11e4d2fc..c2d3feaaa66df67a7076c7bcb874c9f811bb24fc 100644 (file)
@@ -204,8 +204,6 @@ static const struct xfs_dir_ops xfs_dir2_ops = {
        .data_entry_tag_p = xfs_dir2_data_entry_tag_p,
        .data_bestfree_p = xfs_dir2_data_bestfree_p,
 
-       .data_dotdot_offset = sizeof(struct xfs_dir2_data_hdr) +
-                               XFS_DIR2_DATA_ENTSIZE(1),
        .data_first_offset =  sizeof(struct xfs_dir2_data_hdr) +
                                XFS_DIR2_DATA_ENTSIZE(1) +
                                XFS_DIR2_DATA_ENTSIZE(2),
@@ -224,8 +222,6 @@ static const struct xfs_dir_ops xfs_dir2_ftype_ops = {
        .data_entry_tag_p = xfs_dir3_data_entry_tag_p,
        .data_bestfree_p = xfs_dir2_data_bestfree_p,
 
-       .data_dotdot_offset = sizeof(struct xfs_dir2_data_hdr) +
-                               XFS_DIR3_DATA_ENTSIZE(1),
        .data_first_offset =  sizeof(struct xfs_dir2_data_hdr) +
                                XFS_DIR3_DATA_ENTSIZE(1) +
                                XFS_DIR3_DATA_ENTSIZE(2),
@@ -244,8 +240,6 @@ static const struct xfs_dir_ops xfs_dir3_ops = {
        .data_entry_tag_p = xfs_dir3_data_entry_tag_p,
        .data_bestfree_p = xfs_dir3_data_bestfree_p,
 
-       .data_dotdot_offset = sizeof(struct xfs_dir3_data_hdr) +
-                               XFS_DIR3_DATA_ENTSIZE(1),
        .data_first_offset =  sizeof(struct xfs_dir3_data_hdr) +
                                XFS_DIR3_DATA_ENTSIZE(1) +
                                XFS_DIR3_DATA_ENTSIZE(2),
index 94e8c40a7d19d40463d5acdff9b02c76e99917fb..8b937993263d89ec5a3212ea47c0183d066d3d27 100644 (file)
@@ -40,7 +40,6 @@ struct xfs_dir_ops {
        struct xfs_dir2_data_free *
                (*data_bestfree_p)(struct xfs_dir2_data_hdr *hdr);
 
-       xfs_dir2_data_aoff_t data_dotdot_offset;
        xfs_dir2_data_aoff_t data_first_offset;
        size_t  data_entry_offset;