mirror of
https://github.com/torvalds/linux.git
synced 2026-10-16 21:00:02 +02:00
xfs: factor out xfs_attr3_leaf_init
Factor out wrapper xfs_attr3_leaf_init function, which exported for external use. Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Long Li <leo.lilong@huawei.com> Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
parent
ce4e789cf3
commit
e65bb55d7f
|
|
@ -1415,6 +1415,28 @@ xfs_attr3_leaf_create(
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reinitialize an existing attr fork block as an empty leaf, and attach
|
||||
* the buffer to tp.
|
||||
*/
|
||||
int
|
||||
xfs_attr3_leaf_init(
|
||||
struct xfs_trans *tp,
|
||||
struct xfs_inode *dp,
|
||||
xfs_dablk_t blkno)
|
||||
{
|
||||
struct xfs_buf *bp = NULL;
|
||||
struct xfs_da_args args = {
|
||||
.trans = tp,
|
||||
.dp = dp,
|
||||
.owner = dp->i_ino,
|
||||
.geo = dp->i_mount->m_attr_geo,
|
||||
};
|
||||
|
||||
ASSERT(tp != NULL);
|
||||
|
||||
return xfs_attr3_leaf_create(&args, blkno, &bp);
|
||||
}
|
||||
/*
|
||||
* Split the leaf node, rebalance, then add the new entry.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -87,6 +87,9 @@ int xfs_attr3_leaf_list_int(struct xfs_buf *bp,
|
|||
/*
|
||||
* Routines used for shrinking the Btree.
|
||||
*/
|
||||
|
||||
int xfs_attr3_leaf_init(struct xfs_trans *tp, struct xfs_inode *dp,
|
||||
xfs_dablk_t blkno);
|
||||
int xfs_attr3_leaf_toosmall(struct xfs_da_state *state, int *retval);
|
||||
void xfs_attr3_leaf_unbalance(struct xfs_da_state *state,
|
||||
struct xfs_da_state_blk *drop_blk,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user