Skip to content

Commit 72b97ea

Browse files
allisonhendersondjwong
authored andcommitted
xfs: Add helper function xfs_attr_node_removename_rmt
This patch adds another new helper function xfs_attr_node_removename_rmt. This will also help modularize xfs_attr_node_removename when we add delay ready attributes later. Signed-off-by: Allison Collins <[email protected]> Reviewed-by: Brian Foster <[email protected]> Reviewed-by: Chandan Rajendra <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]> Acked-by: Dave Chinner <[email protected]>
1 parent 674eb54 commit 72b97ea

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

fs/xfs/libxfs/xfs_attr.c

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,24 @@ int xfs_attr_node_removename_setup(
11981198
return 0;
11991199
}
12001200

1201+
STATIC int
1202+
xfs_attr_node_remove_rmt(
1203+
struct xfs_da_args *args,
1204+
struct xfs_da_state *state)
1205+
{
1206+
int error = 0;
1207+
1208+
error = xfs_attr_rmtval_remove(args);
1209+
if (error)
1210+
return error;
1211+
1212+
/*
1213+
* Refill the state structure with buffers, the prior calls released our
1214+
* buffers.
1215+
*/
1216+
return xfs_attr_refillstate(state);
1217+
}
1218+
12011219
/*
12021220
* Remove a name from a B-tree attribute list.
12031221
*
@@ -1226,15 +1244,7 @@ xfs_attr_node_removename(
12261244
* overflow the maximum size of a transaction and/or hit a deadlock.
12271245
*/
12281246
if (args->rmtblkno > 0) {
1229-
error = xfs_attr_rmtval_remove(args);
1230-
if (error)
1231-
goto out;
1232-
1233-
/*
1234-
* Refill the state structure with buffers, the prior calls
1235-
* released our buffers.
1236-
*/
1237-
error = xfs_attr_refillstate(state);
1247+
error = xfs_attr_node_remove_rmt(args, state);
12381248
if (error)
12391249
goto out;
12401250
}

0 commit comments

Comments
 (0)