diff options
author | Dave Chinner <dchinner@redhat.com> | 2013-10-29 18:15:02 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-10-30 14:49:18 -0400 |
commit | 1c9a5b2e3045b91a10335adcc73267c304cb5dc0 (patch) | |
tree | 6908572ee6e7b71ec806a9303fe5aa87b478f96b /fs/xfs/xfs_dir2_data.c | |
parent | 24dd0f546c366da68f33bbf2ecef2306f8c2281d (diff) |
xfs: convert directory vector functions to constants
Many of the vectorised function calls now take no parameters and
return a constant value. There is no reason for these to be vectored
functions, so convert them to constants
Binary sizes:
text data bss dec hex filename
794490 96802 1096 892388 d9de4 fs/xfs/xfs.o.orig
792986 96802 1096 890884 d9804 fs/xfs/xfs.o.p1
792350 96802 1096 890248 d9588 fs/xfs/xfs.o.p2
789293 96802 1096 887191 d8997 fs/xfs/xfs.o.p3
789005 96802 1096 886903 d8997 fs/xfs/xfs.o.p4
789061 96802 1096 886959 d88af fs/xfs/xfs.o.p5
789733 96802 1096 887631 d8b4f fs/xfs/xfs.o.p6
791421 96802 1096 889319 d91e7 fs/xfs/xfs.o.p7
791701 96802 1096 889599 d92ff fs/xfs/xfs.o.p8
791205 96802 1096 889103 d91cf fs/xfs/xfs.o.p9
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_dir2_data.c')
-rw-r--r-- | fs/xfs/xfs_dir2_data.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/xfs/xfs_dir2_data.c b/fs/xfs/xfs_dir2_data.c index 32d657fbe6a4..18e920c86be6 100644 --- a/fs/xfs/xfs_dir2_data.c +++ b/fs/xfs/xfs_dir2_data.c | |||
@@ -598,7 +598,7 @@ xfs_dir3_data_init( | |||
598 | hdr->magic = cpu_to_be32(XFS_DIR2_DATA_MAGIC); | 598 | hdr->magic = cpu_to_be32(XFS_DIR2_DATA_MAGIC); |
599 | 599 | ||
600 | bf = dp->d_ops->data_bestfree_p(hdr); | 600 | bf = dp->d_ops->data_bestfree_p(hdr); |
601 | bf[0].offset = cpu_to_be16(dp->d_ops->data_entry_offset()); | 601 | bf[0].offset = cpu_to_be16(dp->d_ops->data_entry_offset); |
602 | for (i = 1; i < XFS_DIR2_DATA_FD_COUNT; i++) { | 602 | for (i = 1; i < XFS_DIR2_DATA_FD_COUNT; i++) { |
603 | bf[i].length = 0; | 603 | bf[i].length = 0; |
604 | bf[i].offset = 0; | 604 | bf[i].offset = 0; |
@@ -610,7 +610,7 @@ xfs_dir3_data_init( | |||
610 | dup = dp->d_ops->data_unused_p(hdr); | 610 | dup = dp->d_ops->data_unused_p(hdr); |
611 | dup->freetag = cpu_to_be16(XFS_DIR2_DATA_FREE_TAG); | 611 | dup->freetag = cpu_to_be16(XFS_DIR2_DATA_FREE_TAG); |
612 | 612 | ||
613 | t = mp->m_dirblksize - (uint)dp->d_ops->data_entry_offset(); | 613 | t = mp->m_dirblksize - (uint)dp->d_ops->data_entry_offset; |
614 | bf[0].length = cpu_to_be16(t); | 614 | bf[0].length = cpu_to_be16(t); |
615 | dup->length = cpu_to_be16(t); | 615 | dup->length = cpu_to_be16(t); |
616 | *xfs_dir2_data_unused_tag_p(dup) = cpu_to_be16((char *)dup - (char *)hdr); | 616 | *xfs_dir2_data_unused_tag_p(dup) = cpu_to_be16((char *)dup - (char *)hdr); |
@@ -663,7 +663,7 @@ xfs_dir2_data_log_header( | |||
663 | hdr->magic == cpu_to_be32(XFS_DIR3_BLOCK_MAGIC)); | 663 | hdr->magic == cpu_to_be32(XFS_DIR3_BLOCK_MAGIC)); |
664 | #endif | 664 | #endif |
665 | 665 | ||
666 | xfs_trans_log_buf(tp, bp, 0, dp->d_ops->data_entry_offset() - 1); | 666 | xfs_trans_log_buf(tp, bp, 0, dp->d_ops->data_entry_offset - 1); |
667 | } | 667 | } |
668 | 668 | ||
669 | /* | 669 | /* |
@@ -742,7 +742,7 @@ xfs_dir2_data_make_free( | |||
742 | * If this isn't the start of the block, then back up to | 742 | * If this isn't the start of the block, then back up to |
743 | * the previous entry and see if it's free. | 743 | * the previous entry and see if it's free. |
744 | */ | 744 | */ |
745 | if (offset > dp->d_ops->data_entry_offset()) { | 745 | if (offset > dp->d_ops->data_entry_offset) { |
746 | __be16 *tagp; /* tag just before us */ | 746 | __be16 *tagp; /* tag just before us */ |
747 | 747 | ||
748 | tagp = (__be16 *)((char *)hdr + offset) - 1; | 748 | tagp = (__be16 *)((char *)hdr + offset) - 1; |