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>
This commit is contained in:
parent
9df2dd0b0d
commit
2599405374
|
@ -541,7 +541,7 @@ xfs_dir2_leaf_bests_p(struct xfs_dir2_leaf_tail *ltp)
|
|||
* Convert dataptr to byte in file space
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
@ -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.
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
@ -571,7 +571,7 @@ xfs_dir2_byte_to_db(struct xfs_mount *mp, xfs_dir2_off_t by)
|
|||
static inline xfs_dir2_db_t
|
||||
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)
|
|||
static inline xfs_dir2_data_aoff_t
|
||||
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
|
|||
xfs_dir2_db_off_to_dataptr(struct xfs_mount *mp, xfs_dir2_db_t db,
|
||||
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(
|
|||
* Fill in the leaf entry.
|
||||
*/
|
||||
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));
|
||||
xfs_dir2_block_log_leaf(tp, bp, lfloglow, lfloghigh);
|
||||
/*
|
||||
|
@ -1170,7 +1170,7 @@ xfs_dir2_sf_to_block(
|
|||
*tagp = cpu_to_be16((char *)dep - (char *)hdr);
|
||||
xfs_dir2_data_log_entry(tp, dp, bp, dep);
|
||||
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));
|
||||
/*
|
||||
* Create entry for ..
|
||||
|
@ -1184,7 +1184,7 @@ xfs_dir2_sf_to_block(
|
|||
*tagp = cpu_to_be16((char *)dep - (char *)hdr);
|
||||
xfs_dir2_data_log_entry(tp, dp, bp, dep);
|
||||
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));
|
||||
offset = dp->d_ops->data_first_offset;
|
||||
/*
|
||||
|
@ -1238,7 +1238,7 @@ xfs_dir2_sf_to_block(
|
|||
name.len = sfep->namelen;
|
||||
blp[2 + i].hashval = cpu_to_be32(mp->m_dirnameops->
|
||||
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));
|
||||
offset = (int)((char *)(tagp + 1) - (char *)hdr);
|
||||
if (++i == sfp->count)
|
||||
|
|
|
@ -531,7 +531,7 @@ xfs_dir2_leaf_getdents(
|
|||
* Inside the loop we keep the main offset value as a byte offset
|
||||
* 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
|
||||
|
@ -635,7 +635,7 @@ xfs_dir2_leaf_getdents(
|
|||
length = dp->d_ops->data_entsize(dep->namelen);
|
||||
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,
|
||||
be64_to_cpu(dep->inumber),
|
||||
xfs_dir3_get_dtype(mp, filetype)))
|
||||
|
@ -653,10 +653,10 @@ xfs_dir2_leaf_getdents(
|
|||
/*
|
||||
* 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;
|
||||
else
|
||||
ctx->pos = xfs_dir2_byte_to_dataptr(mp, curoff) & 0x7fffffff;
|
||||
ctx->pos = xfs_dir2_byte_to_dataptr(curoff) & 0x7fffffff;
|
||||
kmem_free(map_info);
|
||||
if (bp)
|
||||
xfs_trans_brelse(NULL, bp);
|
||||
|
|
Loading…
Reference in New Issue