Commit 82ef1a53 authored by Andrey Albershteyn's avatar Andrey Albershteyn Committed by Chandan Babu R

xfs: reset XFS_ATTR_INCOMPLETE filter on node removal

In XFS_DAS_NODE_REMOVE_ATTR case, xfs_attr_mode_remove_attr() sets
filter to XFS_ATTR_INCOMPLETE. The filter is then reset in
xfs_attr_complete_op() if XFS_DA_OP_REPLACE operation is performed.

The filter is not reset though if XFS just removes the attribute
(args->value == NULL) with xfs_attr_defer_remove(). attr code goes
to XFS_DAS_DONE state.

Fix this by always resetting XFS_ATTR_INCOMPLETE filter. The replace
operation already resets this filter in anyway and others are
completed at this step hence don't need it.

Fixes: fdaf1bb3 ("xfs: ATTR_REPLACE algorithm with LARP enabled needs rework")
Signed-off-by: default avatarAndrey Albershteyn <aalbersh@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
parent 41bccc98
...@@ -421,10 +421,10 @@ xfs_attr_complete_op( ...@@ -421,10 +421,10 @@ xfs_attr_complete_op(
bool do_replace = args->op_flags & XFS_DA_OP_REPLACE; bool do_replace = args->op_flags & XFS_DA_OP_REPLACE;
args->op_flags &= ~XFS_DA_OP_REPLACE; args->op_flags &= ~XFS_DA_OP_REPLACE;
if (do_replace) { args->attr_filter &= ~XFS_ATTR_INCOMPLETE;
args->attr_filter &= ~XFS_ATTR_INCOMPLETE; if (do_replace)
return replace_state; return replace_state;
}
return XFS_DAS_DONE; return XFS_DAS_DONE;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment