Skip to content

Commit 82ef1a5

Browse files
alberandChandan Babu R
authored andcommitted
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: fdaf1bb ("xfs: ATTR_REPLACE algorithm with LARP enabled needs rework") Signed-off-by: Andrey Albershteyn <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Chandan Babu R <[email protected]>
1 parent 41bccc9 commit 82ef1a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/xfs/libxfs/xfs_attr.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,10 +421,10 @@ xfs_attr_complete_op(
421421
bool do_replace = args->op_flags & XFS_DA_OP_REPLACE;
422422

423423
args->op_flags &= ~XFS_DA_OP_REPLACE;
424-
if (do_replace) {
425-
args->attr_filter &= ~XFS_ATTR_INCOMPLETE;
424+
args->attr_filter &= ~XFS_ATTR_INCOMPLETE;
425+
if (do_replace)
426426
return replace_state;
427-
}
427+
428428
return XFS_DAS_DONE;
429429
}
430430

0 commit comments

Comments
 (0)