]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9a70736c6d73e5974cd291cb58c911bf52530432
tree9dde834fe0e058d390f9f1d52f0a0f2287ce16af
parent84ab69652254c8c8870b98097ea9520a55f632bc
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