diff options
author | Eric Sandeen <sandeen@redhat.com> | 2014-04-14 05:02:30 -0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-04-14 05:02:30 -0400 |
commit | 25994053745be958aa8455a753a5c965a9006ba4 (patch) | |
tree | 5555b7dd35df695576cc14617d5e50f5bdbca98f /fs | |
parent | 9df2dd0b0d2aad3ce2480e0618bfe14d37c017a3 (diff) |
xfs: remove unused mp arg from xfs_dir2 dataptr/byte functions
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_da_format.h | 10 | ||||
-rw-r--r-- | fs/xfs/xfs_dir2_block.c | 8 | ||||
-rw-r--r-- | fs/xfs/xfs_dir2_readdir.c | 8 |
3 files changed, 13 insertions, 13 deletions
diff --git a/fs/xfs/xfs_da_format.h b/fs/xfs/xfs_da_format.h index a19d3f8f639c..1432b576b4a7 100644 --- a/fs/xfs/xfs_da_format.h +++ b/fs/xfs/xfs_da_format.h | |||
@@ -541,7 +541,7 @@ xfs_dir2_leaf_bests_p(struct xfs_dir2_leaf_tail *ltp) | |||
541 | * Convert dataptr to byte in file space | 541 | * Convert dataptr to byte in file space |
542 | */ | 542 | */ |
543 | static inline xfs_dir2_off_t | 543 | static inline xfs_dir2_off_t |
544 | xfs_dir2_dataptr_to_byte(struct xfs_mount *mp, xfs_dir2_dataptr_t dp) | 544 | xfs_dir2_dataptr_to_byte(xfs_dir2_dataptr_t dp) |
545 | { | 545 | { |
546 | return (xfs_dir2_off_t)dp << XFS_DIR2_DATA_ALIGN_LOG; | 546 | return (xfs_dir2_off_t)dp << XFS_DIR2_DATA_ALIGN_LOG; |
547 | } | 547 | } |
@@ -550,7 +550,7 @@ xfs_dir2_dataptr_to_byte(struct xfs_mount *mp, xfs_dir2_dataptr_t dp) | |||
550 | * Convert byte in file space to dataptr. It had better be aligned. | 550 | * Convert byte in file space to dataptr. It had better be aligned. |
551 | */ | 551 | */ |
552 | static inline xfs_dir2_dataptr_t | 552 | static inline xfs_dir2_dataptr_t |
553 | xfs_dir2_byte_to_dataptr(struct xfs_mount *mp, xfs_dir2_off_t by) | 553 | xfs_dir2_byte_to_dataptr(xfs_dir2_off_t by) |
554 | { | 554 | { |
555 | return (xfs_dir2_dataptr_t)(by >> XFS_DIR2_DATA_ALIGN_LOG); | 555 | return (xfs_dir2_dataptr_t)(by >> XFS_DIR2_DATA_ALIGN_LOG); |
556 | } | 556 | } |
@@ -571,7 +571,7 @@ xfs_dir2_byte_to_db(struct xfs_mount *mp, xfs_dir2_off_t by) | |||
571 | static inline xfs_dir2_db_t | 571 | static inline xfs_dir2_db_t |
572 | xfs_dir2_dataptr_to_db(struct xfs_mount *mp, xfs_dir2_dataptr_t dp) | 572 | xfs_dir2_dataptr_to_db(struct xfs_mount *mp, xfs_dir2_dataptr_t dp) |
573 | { | 573 | { |
574 | return xfs_dir2_byte_to_db(mp, xfs_dir2_dataptr_to_byte(mp, dp)); | 574 | return xfs_dir2_byte_to_db(mp, xfs_dir2_dataptr_to_byte(dp)); |
575 | } | 575 | } |
576 | 576 | ||
577 | /* | 577 | /* |
@@ -590,7 +590,7 @@ xfs_dir2_byte_to_off(struct xfs_mount *mp, xfs_dir2_off_t by) | |||
590 | static inline xfs_dir2_data_aoff_t | 590 | static inline xfs_dir2_data_aoff_t |
591 | xfs_dir2_dataptr_to_off(struct xfs_mount *mp, xfs_dir2_dataptr_t dp) | 591 | xfs_dir2_dataptr_to_off(struct xfs_mount *mp, xfs_dir2_dataptr_t dp) |
592 | { | 592 | { |
593 | return xfs_dir2_byte_to_off(mp, xfs_dir2_dataptr_to_byte(mp, dp)); | 593 | return xfs_dir2_byte_to_off(mp, xfs_dir2_dataptr_to_byte(dp)); |
594 | } | 594 | } |
595 | 595 | ||
596 | /* | 596 | /* |
@@ -629,7 +629,7 @@ static inline xfs_dir2_dataptr_t | |||
629 | xfs_dir2_db_off_to_dataptr(struct xfs_mount *mp, xfs_dir2_db_t db, | 629 | xfs_dir2_db_off_to_dataptr(struct xfs_mount *mp, xfs_dir2_db_t db, |
630 | xfs_dir2_data_aoff_t o) | 630 | xfs_dir2_data_aoff_t o) |
631 | { | 631 | { |
632 | return xfs_dir2_byte_to_dataptr(mp, xfs_dir2_db_off_to_byte(mp, db, o)); | 632 | return xfs_dir2_byte_to_dataptr(xfs_dir2_db_off_to_byte(mp, db, o)); |
633 | } | 633 | } |
634 | 634 | ||
635 | /* | 635 | /* |
diff --git a/fs/xfs/xfs_dir2_block.c b/fs/xfs/xfs_dir2_block.c index 4f6a38cb83a4..d7acf7017c26 100644 --- a/fs/xfs/xfs_dir2_block.c +++ b/fs/xfs/xfs_dir2_block.c | |||
@@ -537,7 +537,7 @@ xfs_dir2_block_addname( | |||
537 | * Fill in the leaf entry. | 537 | * Fill in the leaf entry. |
538 | */ | 538 | */ |
539 | blp[mid].hashval = cpu_to_be32(args->hashval); | 539 | blp[mid].hashval = cpu_to_be32(args->hashval); |
540 | blp[mid].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(mp, | 540 | blp[mid].address = cpu_to_be32(xfs_dir2_byte_to_dataptr( |
541 | (char *)dep - (char *)hdr)); | 541 | (char *)dep - (char *)hdr)); |
542 | xfs_dir2_block_log_leaf(tp, bp, lfloglow, lfloghigh); | 542 | xfs_dir2_block_log_leaf(tp, bp, lfloglow, lfloghigh); |
543 | /* | 543 | /* |
@@ -1170,7 +1170,7 @@ xfs_dir2_sf_to_block( | |||
1170 | *tagp = cpu_to_be16((char *)dep - (char *)hdr); | 1170 | *tagp = cpu_to_be16((char *)dep - (char *)hdr); |
1171 | xfs_dir2_data_log_entry(tp, dp, bp, dep); | 1171 | xfs_dir2_data_log_entry(tp, dp, bp, dep); |
1172 | blp[0].hashval = cpu_to_be32(xfs_dir_hash_dot); | 1172 | blp[0].hashval = cpu_to_be32(xfs_dir_hash_dot); |
1173 | blp[0].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(mp, | 1173 | blp[0].address = cpu_to_be32(xfs_dir2_byte_to_dataptr( |
1174 | (char *)dep - (char *)hdr)); | 1174 | (char *)dep - (char *)hdr)); |
1175 | /* | 1175 | /* |
1176 | * Create entry for .. | 1176 | * Create entry for .. |
@@ -1184,7 +1184,7 @@ xfs_dir2_sf_to_block( | |||
1184 | *tagp = cpu_to_be16((char *)dep - (char *)hdr); | 1184 | *tagp = cpu_to_be16((char *)dep - (char *)hdr); |
1185 | xfs_dir2_data_log_entry(tp, dp, bp, dep); | 1185 | xfs_dir2_data_log_entry(tp, dp, bp, dep); |
1186 | blp[1].hashval = cpu_to_be32(xfs_dir_hash_dotdot); | 1186 | blp[1].hashval = cpu_to_be32(xfs_dir_hash_dotdot); |
1187 | blp[1].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(mp, | 1187 | blp[1].address = cpu_to_be32(xfs_dir2_byte_to_dataptr( |
1188 | (char *)dep - (char *)hdr)); | 1188 | (char *)dep - (char *)hdr)); |
1189 | offset = dp->d_ops->data_first_offset; | 1189 | offset = dp->d_ops->data_first_offset; |
1190 | /* | 1190 | /* |
@@ -1238,7 +1238,7 @@ xfs_dir2_sf_to_block( | |||
1238 | name.len = sfep->namelen; | 1238 | name.len = sfep->namelen; |
1239 | blp[2 + i].hashval = cpu_to_be32(mp->m_dirnameops-> | 1239 | blp[2 + i].hashval = cpu_to_be32(mp->m_dirnameops-> |
1240 | hashname(&name)); | 1240 | hashname(&name)); |
1241 | blp[2 + i].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(mp, | 1241 | blp[2 + i].address = cpu_to_be32(xfs_dir2_byte_to_dataptr( |
1242 | (char *)dep - (char *)hdr)); | 1242 | (char *)dep - (char *)hdr)); |
1243 | offset = (int)((char *)(tagp + 1) - (char *)hdr); | 1243 | offset = (int)((char *)(tagp + 1) - (char *)hdr); |
1244 | if (++i == sfp->count) | 1244 | if (++i == sfp->count) |
diff --git a/fs/xfs/xfs_dir2_readdir.c b/fs/xfs/xfs_dir2_readdir.c index a99967bd7b6a..50b72f7b8787 100644 --- a/fs/xfs/xfs_dir2_readdir.c +++ b/fs/xfs/xfs_dir2_readdir.c | |||
@@ -531,7 +531,7 @@ xfs_dir2_leaf_getdents( | |||
531 | * Inside the loop we keep the main offset value as a byte offset | 531 | * Inside the loop we keep the main offset value as a byte offset |
532 | * in the directory file. | 532 | * in the directory file. |
533 | */ | 533 | */ |
534 | curoff = xfs_dir2_dataptr_to_byte(mp, ctx->pos); | 534 | curoff = xfs_dir2_dataptr_to_byte(ctx->pos); |
535 | 535 | ||
536 | /* | 536 | /* |
537 | * Force this conversion through db so we truncate the offset | 537 | * Force this conversion through db so we truncate the offset |
@@ -635,7 +635,7 @@ xfs_dir2_leaf_getdents( | |||
635 | length = dp->d_ops->data_entsize(dep->namelen); | 635 | length = dp->d_ops->data_entsize(dep->namelen); |
636 | filetype = dp->d_ops->data_get_ftype(dep); | 636 | filetype = dp->d_ops->data_get_ftype(dep); |
637 | 637 | ||
638 | ctx->pos = xfs_dir2_byte_to_dataptr(mp, curoff) & 0x7fffffff; | 638 | ctx->pos = xfs_dir2_byte_to_dataptr(curoff) & 0x7fffffff; |
639 | if (!dir_emit(ctx, (char *)dep->name, dep->namelen, | 639 | if (!dir_emit(ctx, (char *)dep->name, dep->namelen, |
640 | be64_to_cpu(dep->inumber), | 640 | be64_to_cpu(dep->inumber), |
641 | xfs_dir3_get_dtype(mp, filetype))) | 641 | xfs_dir3_get_dtype(mp, filetype))) |
@@ -653,10 +653,10 @@ xfs_dir2_leaf_getdents( | |||
653 | /* | 653 | /* |
654 | * All done. Set output offset value to current offset. | 654 | * All done. Set output offset value to current offset. |
655 | */ | 655 | */ |
656 | if (curoff > xfs_dir2_dataptr_to_byte(mp, XFS_DIR2_MAX_DATAPTR)) | 656 | if (curoff > xfs_dir2_dataptr_to_byte(XFS_DIR2_MAX_DATAPTR)) |
657 | ctx->pos = XFS_DIR2_MAX_DATAPTR & 0x7fffffff; | 657 | ctx->pos = XFS_DIR2_MAX_DATAPTR & 0x7fffffff; |
658 | else | 658 | else |
659 | ctx->pos = xfs_dir2_byte_to_dataptr(mp, curoff) & 0x7fffffff; | 659 | ctx->pos = xfs_dir2_byte_to_dataptr(curoff) & 0x7fffffff; |
660 | kmem_free(map_info); | 660 | kmem_free(map_info); |
661 | if (bp) | 661 | if (bp) |
662 | xfs_trans_brelse(NULL, bp); | 662 | xfs_trans_brelse(NULL, bp); |