]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: distinguish extra split from real ENOSPC from xfs_attr_node_try_addname
authorChristoph Hellwig <hch@lst.de>
Wed, 18 Sep 2024 05:30:06 +0000 (07:30 +0200)
committerCarlos Maiolino <cem@kernel.org>
Mon, 7 Oct 2024 06:00:11 +0000 (08:00 +0200)
commitb3f4e84e2f438a119b7ca8684a25452b3e57c0f0
tree773a926a825d418eeb48a227e49f10965a618dd0
parenta5f73342abe1f796140f6585e43e2aa7bc1b7975
xfs: distinguish extra split from real ENOSPC from xfs_attr_node_try_addname

Just like xfs_attr3_leaf_split, xfs_attr_node_try_addname can return
-ENOSPC both for an actual failure to allocate a disk block, but also
to signal the caller to convert the format of the attr fork.  Use magic
1 to ask for the conversion here as well.

Note that unlike the similar issue in xfs_attr3_leaf_split, this one was
only found by code review.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/libxfs/xfs_attr.c