xfs: Add helper xfs_attr_node_addname_find_attr
authorAllison Henderson <allison.henderson@oracle.com>
Mon, 12 Apr 2021 21:15:31 +0000 (14:15 -0700)
committerAllison Henderson <allison.henderson@oracle.com>
Tue, 1 Jun 2021 17:49:44 +0000 (10:49 -0700)
commit6ca5a4a1f52952790a40099b79b5631d91163ba4
tree9dde834fe0e058d390f9f1d52f0a0f2287ce16af
parentf0f7c502c728d0c6947219739631bad101f8737b
xfs: Add helper xfs_attr_node_addname_find_attr

This patch separates the first half of xfs_attr_node_addname into a
helper function xfs_attr_node_addname_find_attr.  It also replaces the
restart goto with an EAGAIN return code driven by a loop in the calling
function.  This looks odd now, but will clean up nicly once we introduce
the state machine.  It will also enable hoisting the last state out of
xfs_attr_node_addname with out having to plumb in a "done" parameter to
know if we need to move to the next state or not.

Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
fs/xfs/libxfs/xfs_attr.c