xfs: make xattri_leaf_bp more useful
authorDave Chinner <dchinner@redhat.com>
Wed, 11 May 2022 07:04:23 +0000 (17:04 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 11 May 2022 07:04:23 +0000 (17:04 +1000)
commite22b88de5bacdd60ffa70e911e5fbae9ad36441a
treef2c8a8bd863bbc9d7e3763720468f0e3ee84f49b
parentf3d430ff8cda80ccb9b73d9efa0e186fa532b74e
xfs: make xattri_leaf_bp more useful

We currently set it and hold it when converting from short to leaf
form, then release it only to immediately look it back up again
to do the leaf insert.

Do a bit of refactoring to xfs_attr_leaf_try_add() to avoid this
messy handling of the newly allocated leaf buffer.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Allison Henderson<allison.henderson@oracle.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/libxfs/xfs_attr.c