summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/libxfs/xfs_attr.c12
-rw-r--r--fs/xfs/libxfs/xfs_attr_remote.c3
2 files changed, 12 insertions, 3 deletions
diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c
index 2d84ab40b70b..2379d5b1a1b9 100644
--- a/fs/xfs/libxfs/xfs_attr.c
+++ b/fs/xfs/libxfs/xfs_attr.c
@@ -670,6 +670,10 @@ xfs_attr_leaf_addname(
args->rmtblkcnt = args->rmtblkcnt2;
args->rmtvaluelen = args->rmtvaluelen2;
if (args->rmtblkno) {
+ error = xfs_attr_rmtval_invalidate(args);
+ if (error)
+ return error;
+
error = xfs_attr_rmtval_remove(args);
if (error)
return error;
@@ -1023,6 +1027,10 @@ restart:
args->rmtblkcnt = args->rmtblkcnt2;
args->rmtvaluelen = args->rmtvaluelen2;
if (args->rmtblkno) {
+ error = xfs_attr_rmtval_invalidate(args);
+ if (error)
+ return error;
+
error = xfs_attr_rmtval_remove(args);
if (error)
return error;
@@ -1147,6 +1155,10 @@ xfs_attr_node_removename(
if (error)
goto out;
+ error = xfs_attr_rmtval_invalidate(args);
+ if (error)
+ return error;
+
error = xfs_attr_rmtval_remove(args);
if (error)
goto out;
diff --git a/fs/xfs/libxfs/xfs_attr_remote.c b/fs/xfs/libxfs/xfs_attr_remote.c
index 3e7f6e075860..3f80cede7406 100644
--- a/fs/xfs/libxfs/xfs_attr_remote.c
+++ b/fs/xfs/libxfs/xfs_attr_remote.c
@@ -683,9 +683,6 @@ xfs_attr_rmtval_remove(
trace_xfs_attr_rmtval_remove(args);
- error = xfs_attr_rmtval_invalidate(args);
- if (error)
- return error;
/*
* Keep de-allocating extents until the remote-value region is gone.
*/