Skip to content

Commit d4034c4

Browse files
allisonhendersondjwong
authored andcommitted
xfs: Pull up xfs_attr_rmtval_invalidate
This patch pulls xfs_attr_rmtval_invalidate out of xfs_attr_rmtval_remove and into the calling functions. Eventually __xfs_attr_rmtval_remove will replace xfs_attr_rmtval_remove when we introduce delayed attributes. These functions are exepcted to return -EAGAIN when they need a new transaction. Because the invalidate does not need a new transaction, we need to separate it from the rest of the function that does. This will enable __xfs_attr_rmtval_remove to smoothly replace xfs_attr_rmtval_remove later. Signed-off-by: Allison Collins <[email protected]> Reviewed-by: Brian Foster <[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 8b8e0cc commit d4034c4

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

fs/xfs/libxfs/xfs_attr.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,10 @@ xfs_attr_leaf_addname(
670670
args->rmtblkcnt = args->rmtblkcnt2;
671671
args->rmtvaluelen = args->rmtvaluelen2;
672672
if (args->rmtblkno) {
673+
error = xfs_attr_rmtval_invalidate(args);
674+
if (error)
675+
return error;
676+
673677
error = xfs_attr_rmtval_remove(args);
674678
if (error)
675679
return error;
@@ -1023,6 +1027,10 @@ xfs_attr_node_addname(
10231027
args->rmtblkcnt = args->rmtblkcnt2;
10241028
args->rmtvaluelen = args->rmtvaluelen2;
10251029
if (args->rmtblkno) {
1030+
error = xfs_attr_rmtval_invalidate(args);
1031+
if (error)
1032+
return error;
1033+
10261034
error = xfs_attr_rmtval_remove(args);
10271035
if (error)
10281036
return error;
@@ -1147,6 +1155,10 @@ xfs_attr_node_removename(
11471155
if (error)
11481156
goto out;
11491157

1158+
error = xfs_attr_rmtval_invalidate(args);
1159+
if (error)
1160+
return error;
1161+
11501162
error = xfs_attr_rmtval_remove(args);
11511163
if (error)
11521164
goto out;

fs/xfs/libxfs/xfs_attr_remote.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,9 +683,6 @@ xfs_attr_rmtval_remove(
683683

684684
trace_xfs_attr_rmtval_remove(args);
685685

686-
error = xfs_attr_rmtval_invalidate(args);
687-
if (error)
688-
return error;
689686
/*
690687
* Keep de-allocating extents until the remote-value region is gone.
691688
*/

0 commit comments

Comments
 (0)