xfs: xfs_attr_set_iter() does not need to return EAGAIN
authorDave Chinner <dchinner@redhat.com>
Thu, 12 May 2022 05:12:55 +0000 (15:12 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 12 May 2022 05:12:55 +0000 (15:12 +1000)
commit4e3d96a57a06f20f4ce04a92422cc100251f346d
tree1f47c2c00dc01cc115b6f6266f0bb208608312ae
parentb11fa61bc4c679172a35e48d149f797ee37db3fc
xfs: xfs_attr_set_iter() does not need to return EAGAIN

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>
fs/xfs/libxfs/xfs_attr.c
fs/xfs/xfs_attr_item.c