提交 25994053 编写于 作者: E Eric Sandeen 提交者: Dave Chinner

xfs: remove unused mp arg from xfs_dir2 dataptr/byte functions

Signed-off-by: NEric Sandeen <sandeen@redhat.com>
Reviewed-by: NDave Chinner <dchinner@redhat.com>
Signed-off-by: NDave Chinner <david@fromorbit.com>
上级 9df2dd0b
...@@ -541,7 +541,7 @@ xfs_dir2_leaf_bests_p(struct xfs_dir2_leaf_tail *ltp) ...@@ -541,7 +541,7 @@ xfs_dir2_leaf_bests_p(struct xfs_dir2_leaf_tail *ltp)
* Convert dataptr to byte in file space * Convert dataptr to byte in file space
*/ */
static inline xfs_dir2_off_t static inline xfs_dir2_off_t
xfs_dir2_dataptr_to_byte(struct xfs_mount *mp, xfs_dir2_dataptr_t dp) xfs_dir2_dataptr_to_byte(xfs_dir2_dataptr_t dp)
{ {
return (xfs_dir2_off_t)dp << XFS_DIR2_DATA_ALIGN_LOG; return (xfs_dir2_off_t)dp << XFS_DIR2_DATA_ALIGN_LOG;
} }
...@@ -550,7 +550,7 @@ xfs_dir2_dataptr_to_byte(struct xfs_mount *mp, xfs_dir2_dataptr_t dp) ...@@ -550,7 +550,7 @@ xfs_dir2_dataptr_to_byte(struct xfs_mount *mp, xfs_dir2_dataptr_t dp)
* Convert byte in file space to dataptr. It had better be aligned. * Convert byte in file space to dataptr. It had better be aligned.
*/ */
static inline xfs_dir2_dataptr_t static inline xfs_dir2_dataptr_t
xfs_dir2_byte_to_dataptr(struct xfs_mount *mp, xfs_dir2_off_t by) xfs_dir2_byte_to_dataptr(xfs_dir2_off_t by)
{ {
return (xfs_dir2_dataptr_t)(by >> XFS_DIR2_DATA_ALIGN_LOG); return (xfs_dir2_dataptr_t)(by >> XFS_DIR2_DATA_ALIGN_LOG);
} }
...@@ -571,7 +571,7 @@ xfs_dir2_byte_to_db(struct xfs_mount *mp, xfs_dir2_off_t by) ...@@ -571,7 +571,7 @@ xfs_dir2_byte_to_db(struct xfs_mount *mp, xfs_dir2_off_t by)
static inline xfs_dir2_db_t static inline xfs_dir2_db_t
xfs_dir2_dataptr_to_db(struct xfs_mount *mp, xfs_dir2_dataptr_t dp) xfs_dir2_dataptr_to_db(struct xfs_mount *mp, xfs_dir2_dataptr_t dp)
{ {
return xfs_dir2_byte_to_db(mp, xfs_dir2_dataptr_to_byte(mp, dp)); return xfs_dir2_byte_to_db(mp, xfs_dir2_dataptr_to_byte(dp));
} }
/* /*
...@@ -590,7 +590,7 @@ xfs_dir2_byte_to_off(struct xfs_mount *mp, xfs_dir2_off_t by) ...@@ -590,7 +590,7 @@ xfs_dir2_byte_to_off(struct xfs_mount *mp, xfs_dir2_off_t by)
static inline xfs_dir2_data_aoff_t static inline xfs_dir2_data_aoff_t
xfs_dir2_dataptr_to_off(struct xfs_mount *mp, xfs_dir2_dataptr_t dp) xfs_dir2_dataptr_to_off(struct xfs_mount *mp, xfs_dir2_dataptr_t dp)
{ {
return xfs_dir2_byte_to_off(mp, xfs_dir2_dataptr_to_byte(mp, dp)); return xfs_dir2_byte_to_off(mp, xfs_dir2_dataptr_to_byte(dp));
} }
/* /*
...@@ -629,7 +629,7 @@ static inline xfs_dir2_dataptr_t ...@@ -629,7 +629,7 @@ static inline xfs_dir2_dataptr_t
xfs_dir2_db_off_to_dataptr(struct xfs_mount *mp, xfs_dir2_db_t db, xfs_dir2_db_off_to_dataptr(struct xfs_mount *mp, xfs_dir2_db_t db,
xfs_dir2_data_aoff_t o) xfs_dir2_data_aoff_t o)
{ {
return xfs_dir2_byte_to_dataptr(mp, xfs_dir2_db_off_to_byte(mp, db, o)); return xfs_dir2_byte_to_dataptr(xfs_dir2_db_off_to_byte(mp, db, o));
} }
/* /*
......
...@@ -537,7 +537,7 @@ xfs_dir2_block_addname( ...@@ -537,7 +537,7 @@ xfs_dir2_block_addname(
* Fill in the leaf entry. * Fill in the leaf entry.
*/ */
blp[mid].hashval = cpu_to_be32(args->hashval); blp[mid].hashval = cpu_to_be32(args->hashval);
blp[mid].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(mp, blp[mid].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(
(char *)dep - (char *)hdr)); (char *)dep - (char *)hdr));
xfs_dir2_block_log_leaf(tp, bp, lfloglow, lfloghigh); xfs_dir2_block_log_leaf(tp, bp, lfloglow, lfloghigh);
/* /*
...@@ -1170,7 +1170,7 @@ xfs_dir2_sf_to_block( ...@@ -1170,7 +1170,7 @@ xfs_dir2_sf_to_block(
*tagp = cpu_to_be16((char *)dep - (char *)hdr); *tagp = cpu_to_be16((char *)dep - (char *)hdr);
xfs_dir2_data_log_entry(tp, dp, bp, dep); xfs_dir2_data_log_entry(tp, dp, bp, dep);
blp[0].hashval = cpu_to_be32(xfs_dir_hash_dot); blp[0].hashval = cpu_to_be32(xfs_dir_hash_dot);
blp[0].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(mp, blp[0].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(
(char *)dep - (char *)hdr)); (char *)dep - (char *)hdr));
/* /*
* Create entry for .. * Create entry for ..
...@@ -1184,7 +1184,7 @@ xfs_dir2_sf_to_block( ...@@ -1184,7 +1184,7 @@ xfs_dir2_sf_to_block(
*tagp = cpu_to_be16((char *)dep - (char *)hdr); *tagp = cpu_to_be16((char *)dep - (char *)hdr);
xfs_dir2_data_log_entry(tp, dp, bp, dep); xfs_dir2_data_log_entry(tp, dp, bp, dep);
blp[1].hashval = cpu_to_be32(xfs_dir_hash_dotdot); blp[1].hashval = cpu_to_be32(xfs_dir_hash_dotdot);
blp[1].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(mp, blp[1].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(
(char *)dep - (char *)hdr)); (char *)dep - (char *)hdr));
offset = dp->d_ops->data_first_offset; offset = dp->d_ops->data_first_offset;
/* /*
...@@ -1238,7 +1238,7 @@ xfs_dir2_sf_to_block( ...@@ -1238,7 +1238,7 @@ xfs_dir2_sf_to_block(
name.len = sfep->namelen; name.len = sfep->namelen;
blp[2 + i].hashval = cpu_to_be32(mp->m_dirnameops-> blp[2 + i].hashval = cpu_to_be32(mp->m_dirnameops->
hashname(&name)); hashname(&name));
blp[2 + i].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(mp, blp[2 + i].address = cpu_to_be32(xfs_dir2_byte_to_dataptr(
(char *)dep - (char *)hdr)); (char *)dep - (char *)hdr));
offset = (int)((char *)(tagp + 1) - (char *)hdr); offset = (int)((char *)(tagp + 1) - (char *)hdr);
if (++i == sfp->count) if (++i == sfp->count)
......
...@@ -531,7 +531,7 @@ xfs_dir2_leaf_getdents( ...@@ -531,7 +531,7 @@ xfs_dir2_leaf_getdents(
* Inside the loop we keep the main offset value as a byte offset * Inside the loop we keep the main offset value as a byte offset
* in the directory file. * in the directory file.
*/ */
curoff = xfs_dir2_dataptr_to_byte(mp, ctx->pos); curoff = xfs_dir2_dataptr_to_byte(ctx->pos);
/* /*
* Force this conversion through db so we truncate the offset * Force this conversion through db so we truncate the offset
...@@ -635,7 +635,7 @@ xfs_dir2_leaf_getdents( ...@@ -635,7 +635,7 @@ xfs_dir2_leaf_getdents(
length = dp->d_ops->data_entsize(dep->namelen); length = dp->d_ops->data_entsize(dep->namelen);
filetype = dp->d_ops->data_get_ftype(dep); filetype = dp->d_ops->data_get_ftype(dep);
ctx->pos = xfs_dir2_byte_to_dataptr(mp, curoff) & 0x7fffffff; ctx->pos = xfs_dir2_byte_to_dataptr(curoff) & 0x7fffffff;
if (!dir_emit(ctx, (char *)dep->name, dep->namelen, if (!dir_emit(ctx, (char *)dep->name, dep->namelen,
be64_to_cpu(dep->inumber), be64_to_cpu(dep->inumber),
xfs_dir3_get_dtype(mp, filetype))) xfs_dir3_get_dtype(mp, filetype)))
...@@ -653,10 +653,10 @@ xfs_dir2_leaf_getdents( ...@@ -653,10 +653,10 @@ xfs_dir2_leaf_getdents(
/* /*
* All done. Set output offset value to current offset. * All done. Set output offset value to current offset.
*/ */
if (curoff > xfs_dir2_dataptr_to_byte(mp, XFS_DIR2_MAX_DATAPTR)) if (curoff > xfs_dir2_dataptr_to_byte(XFS_DIR2_MAX_DATAPTR))
ctx->pos = XFS_DIR2_MAX_DATAPTR & 0x7fffffff; ctx->pos = XFS_DIR2_MAX_DATAPTR & 0x7fffffff;
else else
ctx->pos = xfs_dir2_byte_to_dataptr(mp, curoff) & 0x7fffffff; ctx->pos = xfs_dir2_byte_to_dataptr(curoff) & 0x7fffffff;
kmem_free(map_info); kmem_free(map_info);
if (bp) if (bp)
xfs_trans_brelse(NULL, bp); xfs_trans_brelse(NULL, bp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册