xfs: Refactor xfs_attr_set_shortform
authorAllison Henderson <allison.henderson@oracle.com>
Thu, 18 Feb 2021 08:09:18 +0000 (01:09 -0700)
committerAllison Henderson <allison.henderson@oracle.com>
Tue, 1 Jun 2021 17:49:42 +0000 (10:49 -0700)
commit6286514b63e12d7bedc67e46aa1aeff9ed8378ce
treebd5726fdee9538aed9b881a654ea635c5f433c20
parenta8490f699f6ec88843879b92cbb21953dab379ee
xfs: Refactor xfs_attr_set_shortform

This patch is actually the combination of patches from the previous
version (v18).  Initially patch 3 hoisted xfs_attr_set_shortform, and
the next added the helper xfs_attr_set_fmt. xfs_attr_set_fmt is similar
the old xfs_attr_set_shortform. It returns 0 when the attr has been set
and no further action is needed. It returns -EAGAIN when shortform has
been transformed to leaf, and the calling function should proceed the
set the attr in leaf form.

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