xfs: Add helper function xfs_attr_try_sf_addname
authorAllison Henderson <allison.henderson@oracle.com>
Wed, 24 Jul 2019 06:34:48 +0000 (06:34 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2019 06:28:58 +0000 (08:28 +0200)
commitb3a248f2307c6d73536851b2b487c538ccf1c106
tree264de33e212ea9e30284941c193692c9ea916544
parenta9912f346bdc6db395c9a13512a3517eb4ad9bf6
xfs: Add helper function xfs_attr_try_sf_addname

commit 4c74a56b9de76bb6b581274b76b52535ad77c2a7 upstream.

This patch adds a subroutine xfs_attr_try_sf_addname
used by xfs_attr_set.  This subrotine will attempt to
add the attribute name specified in args in shortform,
as well and perform error handling previously done in
xfs_attr_set.

This patch helps to pre-simplify xfs_attr_set for reviewing
purposes and reduce indentation.  New function will be added
in the next patch.

[dgc: moved commit to helper function, too.]

Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/xfs/libxfs/xfs_attr.c