]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: reset XFS_ATTR_INCOMPLETE filter on node removal
authorAndrey Albershteyn <aalbersh@redhat.com>
Mon, 15 Apr 2024 23:07:44 +0000 (16:07 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 17 Apr 2024 21:06:27 +0000 (14:06 -0700)
commitc8499fbfdd173e2964507d151178c80e1d59669b
tree6082e3e6fc743a54f42fc450ed026622c3a7a982
parent26da39996aa4f933315a41ae9860755e2d3fa488
xfs: reset XFS_ATTR_INCOMPLETE filter on node removal

Source kernel commit: 82ef1a5356572219f41f9123ca047259a77bd67b

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: fdaf1bb3cafc ("xfs: ATTR_REPLACE algorithm with LARP enabled needs rework")
Signed-off-by: Andrey Albershteyn <aalbersh@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Reviewed-by: Bill O'Donnell <bodonnel@redhat.com>
libxfs/xfs_attr.c