]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: xfs_attr_set_iter() does not need to return EAGAIN
authorDave Chinner <dchinner@redhat.com>
Wed, 22 Jun 2022 19:28:52 +0000 (14:28 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 22 Jun 2022 19:28:52 +0000 (14:28 -0500)
commit5a9d08d86546a6414a564d68a1d3fb05e83d2a29
tree0bb36cc6d8f9e1537ac5d4727c12b4ce93af570d
parentcf76c91718081dd3e199192cf5faabaaf8029887
xfs: xfs_attr_set_iter() does not need to return EAGAIN

Source kernel commit: 4e3d96a57a06f20f4ce04a92422cc100251f346d

Now that the full xfs_attr_set_iter() state machine always
terminates with either the state being XFS_DAS_DONE on success or
an error on failure, we can get rid of the need for it to return
-EAGAIN whenever it needs to roll the transaction before running
the next state.

That is, we don't need to spray -EAGAIN return states everywhere,
the caller just check the state machine state for completion to
determine what action should be taken next. This greatly simplifies
the code within the state machine implementation as it now only has
to handle 0 for success or -errno for error and it doesn't need to
tell the caller to retry.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Allison Henderson<allison.henderson@oracle.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_attr.c