]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: Add helper xfs_attr_node_addname_find_attr
authorAllison Henderson <allison.henderson@oracle.com>
Fri, 15 Oct 2021 20:28:24 +0000 (16:28 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 15 Oct 2021 20:28:24 +0000 (16:28 -0400)
commitf7dcc61f2c36e08798a7fb76197b0dadc027232b
treed98247e489a3924922823e121781bd46bc49d1d5
parent473c6b8ff2fc49e78e712ee4dd61979453796eb1
xfs: Add helper xfs_attr_node_addname_find_attr

Source kernel commit: 6ca5a4a1f52952790a40099b79b5631d91163ba4

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>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_attr.c