mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-12 16:58:53 +00:00
xfs: remove unused tp arg from xfs_bmap_last_offset() and callers
remove unused transaction pointer from various callchains leading to xfs_bmap_last_offset(). 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
c9eaa447e7
commit
7fb2cd4d32
@ -1675,7 +1675,6 @@ xfs_bmap_isaeof(
|
|||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
xfs_bmap_last_offset(
|
xfs_bmap_last_offset(
|
||||||
struct xfs_trans *tp,
|
|
||||||
struct xfs_inode *ip,
|
struct xfs_inode *ip,
|
||||||
xfs_fileoff_t *last_block,
|
xfs_fileoff_t *last_block,
|
||||||
int whichfork)
|
int whichfork)
|
||||||
|
@ -156,8 +156,8 @@ int xfs_bmap_first_unused(struct xfs_trans *tp, struct xfs_inode *ip,
|
|||||||
xfs_extlen_t len, xfs_fileoff_t *unused, int whichfork);
|
xfs_extlen_t len, xfs_fileoff_t *unused, int whichfork);
|
||||||
int xfs_bmap_last_before(struct xfs_trans *tp, struct xfs_inode *ip,
|
int xfs_bmap_last_before(struct xfs_trans *tp, struct xfs_inode *ip,
|
||||||
xfs_fileoff_t *last_block, int whichfork);
|
xfs_fileoff_t *last_block, int whichfork);
|
||||||
int xfs_bmap_last_offset(struct xfs_trans *tp, struct xfs_inode *ip,
|
int xfs_bmap_last_offset(struct xfs_inode *ip, xfs_fileoff_t *unused,
|
||||||
xfs_fileoff_t *unused, int whichfork);
|
int whichfork);
|
||||||
int xfs_bmap_one_block(struct xfs_inode *ip, int whichfork);
|
int xfs_bmap_one_block(struct xfs_inode *ip, int whichfork);
|
||||||
int xfs_bmap_read_extents(struct xfs_trans *tp, struct xfs_inode *ip,
|
int xfs_bmap_read_extents(struct xfs_trans *tp, struct xfs_inode *ip,
|
||||||
int whichfork);
|
int whichfork);
|
||||||
|
@ -244,7 +244,7 @@ xfs_dir_createname(
|
|||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
rval = xfs_dir2_isblock(tp, dp, &v);
|
rval = xfs_dir2_isblock(dp, &v);
|
||||||
if (rval)
|
if (rval)
|
||||||
goto out_free;
|
goto out_free;
|
||||||
if (v) {
|
if (v) {
|
||||||
@ -252,7 +252,7 @@ xfs_dir_createname(
|
|||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
rval = xfs_dir2_isleaf(tp, dp, &v);
|
rval = xfs_dir2_isleaf(dp, &v);
|
||||||
if (rval)
|
if (rval)
|
||||||
goto out_free;
|
goto out_free;
|
||||||
if (v)
|
if (v)
|
||||||
@ -336,7 +336,7 @@ xfs_dir_lookup(
|
|||||||
goto out_check_rval;
|
goto out_check_rval;
|
||||||
}
|
}
|
||||||
|
|
||||||
rval = xfs_dir2_isblock(tp, dp, &v);
|
rval = xfs_dir2_isblock(dp, &v);
|
||||||
if (rval)
|
if (rval)
|
||||||
goto out_free;
|
goto out_free;
|
||||||
if (v) {
|
if (v) {
|
||||||
@ -344,7 +344,7 @@ xfs_dir_lookup(
|
|||||||
goto out_check_rval;
|
goto out_check_rval;
|
||||||
}
|
}
|
||||||
|
|
||||||
rval = xfs_dir2_isleaf(tp, dp, &v);
|
rval = xfs_dir2_isleaf(dp, &v);
|
||||||
if (rval)
|
if (rval)
|
||||||
goto out_free;
|
goto out_free;
|
||||||
if (v)
|
if (v)
|
||||||
@ -408,7 +408,7 @@ xfs_dir_removename(
|
|||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
rval = xfs_dir2_isblock(tp, dp, &v);
|
rval = xfs_dir2_isblock(dp, &v);
|
||||||
if (rval)
|
if (rval)
|
||||||
goto out_free;
|
goto out_free;
|
||||||
if (v) {
|
if (v) {
|
||||||
@ -416,7 +416,7 @@ xfs_dir_removename(
|
|||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
rval = xfs_dir2_isleaf(tp, dp, &v);
|
rval = xfs_dir2_isleaf(dp, &v);
|
||||||
if (rval)
|
if (rval)
|
||||||
goto out_free;
|
goto out_free;
|
||||||
if (v)
|
if (v)
|
||||||
@ -472,7 +472,7 @@ xfs_dir_replace(
|
|||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
rval = xfs_dir2_isblock(tp, dp, &v);
|
rval = xfs_dir2_isblock(dp, &v);
|
||||||
if (rval)
|
if (rval)
|
||||||
goto out_free;
|
goto out_free;
|
||||||
if (v) {
|
if (v) {
|
||||||
@ -480,7 +480,7 @@ xfs_dir_replace(
|
|||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
rval = xfs_dir2_isleaf(tp, dp, &v);
|
rval = xfs_dir2_isleaf(dp, &v);
|
||||||
if (rval)
|
if (rval)
|
||||||
goto out_free;
|
goto out_free;
|
||||||
if (v)
|
if (v)
|
||||||
@ -531,7 +531,7 @@ xfs_dir_canenter(
|
|||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
rval = xfs_dir2_isblock(tp, dp, &v);
|
rval = xfs_dir2_isblock(dp, &v);
|
||||||
if (rval)
|
if (rval)
|
||||||
goto out_free;
|
goto out_free;
|
||||||
if (v) {
|
if (v) {
|
||||||
@ -539,7 +539,7 @@ xfs_dir_canenter(
|
|||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
rval = xfs_dir2_isleaf(tp, dp, &v);
|
rval = xfs_dir2_isleaf(dp, &v);
|
||||||
if (rval)
|
if (rval)
|
||||||
goto out_free;
|
goto out_free;
|
||||||
if (v)
|
if (v)
|
||||||
@ -607,7 +607,6 @@ xfs_dir2_grow_inode(
|
|||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
xfs_dir2_isblock(
|
xfs_dir2_isblock(
|
||||||
xfs_trans_t *tp,
|
|
||||||
xfs_inode_t *dp,
|
xfs_inode_t *dp,
|
||||||
int *vp) /* out: 1 is block, 0 is not block */
|
int *vp) /* out: 1 is block, 0 is not block */
|
||||||
{
|
{
|
||||||
@ -616,7 +615,7 @@ xfs_dir2_isblock(
|
|||||||
int rval;
|
int rval;
|
||||||
|
|
||||||
mp = dp->i_mount;
|
mp = dp->i_mount;
|
||||||
if ((rval = xfs_bmap_last_offset(tp, dp, &last, XFS_DATA_FORK)))
|
if ((rval = xfs_bmap_last_offset(dp, &last, XFS_DATA_FORK)))
|
||||||
return rval;
|
return rval;
|
||||||
rval = XFS_FSB_TO_B(mp, last) == mp->m_dirblksize;
|
rval = XFS_FSB_TO_B(mp, last) == mp->m_dirblksize;
|
||||||
ASSERT(rval == 0 || dp->i_d.di_size == mp->m_dirblksize);
|
ASSERT(rval == 0 || dp->i_d.di_size == mp->m_dirblksize);
|
||||||
@ -629,7 +628,6 @@ xfs_dir2_isblock(
|
|||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
xfs_dir2_isleaf(
|
xfs_dir2_isleaf(
|
||||||
xfs_trans_t *tp,
|
|
||||||
xfs_inode_t *dp,
|
xfs_inode_t *dp,
|
||||||
int *vp) /* out: 1 is leaf, 0 is not leaf */
|
int *vp) /* out: 1 is leaf, 0 is not leaf */
|
||||||
{
|
{
|
||||||
@ -638,7 +636,7 @@ xfs_dir2_isleaf(
|
|||||||
int rval;
|
int rval;
|
||||||
|
|
||||||
mp = dp->i_mount;
|
mp = dp->i_mount;
|
||||||
if ((rval = xfs_bmap_last_offset(tp, dp, &last, XFS_DATA_FORK)))
|
if ((rval = xfs_bmap_last_offset(dp, &last, XFS_DATA_FORK)))
|
||||||
return rval;
|
return rval;
|
||||||
*vp = last == mp->m_dirleafblk + (1 << mp->m_sb.sb_dirblklog);
|
*vp = last == mp->m_dirleafblk + (1 << mp->m_sb.sb_dirblklog);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -142,8 +142,8 @@ extern int xfs_dir2_sf_to_block(struct xfs_da_args *args);
|
|||||||
/*
|
/*
|
||||||
* Interface routines used by userspace utilities
|
* Interface routines used by userspace utilities
|
||||||
*/
|
*/
|
||||||
extern int xfs_dir2_isblock(struct xfs_trans *tp, struct xfs_inode *dp, int *r);
|
extern int xfs_dir2_isblock(struct xfs_inode *dp, int *r);
|
||||||
extern int xfs_dir2_isleaf(struct xfs_trans *tp, struct xfs_inode *dp, int *r);
|
extern int xfs_dir2_isleaf(struct xfs_inode *dp, int *r);
|
||||||
extern int xfs_dir2_shrink_inode(struct xfs_da_args *args, xfs_dir2_db_t db,
|
extern int xfs_dir2_shrink_inode(struct xfs_da_args *args, xfs_dir2_db_t db,
|
||||||
struct xfs_buf *bp);
|
struct xfs_buf *bp);
|
||||||
|
|
||||||
|
@ -1708,7 +1708,7 @@ xfs_dir2_node_to_leaf(
|
|||||||
/*
|
/*
|
||||||
* Get the last offset in the file.
|
* Get the last offset in the file.
|
||||||
*/
|
*/
|
||||||
if ((error = xfs_bmap_last_offset(tp, dp, &fo, XFS_DATA_FORK))) {
|
if ((error = xfs_bmap_last_offset(dp, &fo, XFS_DATA_FORK))) {
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
fo -= mp->m_dirblkfsbs;
|
fo -= mp->m_dirblkfsbs;
|
||||||
|
@ -1727,7 +1727,7 @@ xfs_dir2_node_addname_int(
|
|||||||
if (dbno == -1) {
|
if (dbno == -1) {
|
||||||
xfs_fileoff_t fo; /* freespace block number */
|
xfs_fileoff_t fo; /* freespace block number */
|
||||||
|
|
||||||
if ((error = xfs_bmap_last_offset(tp, dp, &fo, XFS_DATA_FORK)))
|
if ((error = xfs_bmap_last_offset(dp, &fo, XFS_DATA_FORK)))
|
||||||
return error;
|
return error;
|
||||||
lastfbno = xfs_dir2_da_to_db(mp, (xfs_dablk_t)fo);
|
lastfbno = xfs_dir2_da_to_db(mp, (xfs_dablk_t)fo);
|
||||||
fbno = ifbno;
|
fbno = ifbno;
|
||||||
|
@ -687,7 +687,7 @@ xfs_readdir(
|
|||||||
lock_mode = xfs_ilock_data_map_shared(dp);
|
lock_mode = xfs_ilock_data_map_shared(dp);
|
||||||
if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL)
|
if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL)
|
||||||
rval = xfs_dir2_sf_getdents(dp, ctx);
|
rval = xfs_dir2_sf_getdents(dp, ctx);
|
||||||
else if ((rval = xfs_dir2_isblock(NULL, dp, &v)))
|
else if ((rval = xfs_dir2_isblock(dp, &v)))
|
||||||
;
|
;
|
||||||
else if (v)
|
else if (v)
|
||||||
rval = xfs_dir2_block_getdents(dp, ctx);
|
rval = xfs_dir2_block_getdents(dp, ctx);
|
||||||
|
@ -730,7 +730,7 @@ xfs_iomap_write_allocate(
|
|||||||
*/
|
*/
|
||||||
nimaps = 1;
|
nimaps = 1;
|
||||||
end_fsb = XFS_B_TO_FSB(mp, XFS_ISIZE(ip));
|
end_fsb = XFS_B_TO_FSB(mp, XFS_ISIZE(ip));
|
||||||
error = xfs_bmap_last_offset(NULL, ip, &last_block,
|
error = xfs_bmap_last_offset(ip, &last_block,
|
||||||
XFS_DATA_FORK);
|
XFS_DATA_FORK);
|
||||||
if (error)
|
if (error)
|
||||||
goto trans_cancel;
|
goto trans_cancel;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user