btrfs: handle btrfs_del_item errors in __btrfs_update_delayed_inode
PATCH 1/1 btrfs: handle btrfs_del_item errors in __btrfs_update_delayed_inode
Even if the slot is already read out, we may still need to re-balance the tree, thus it can cause error in that btrfs_del_item() call.
Signed-off-by void0red <[email protected]>
--- fs/btrfs/delayed-inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/delayed-inode.c +1 -1
@@ -1043,7 +1043,7 @@ static int __btrfs_update_delayed_inode(struct btrfs_trans_handle *trans,* so there is only one iref. The case that several irefs are * in the same item doesn't exist. */ -btrfs_del_item (trans, root, path); + ret =btrfs_del_item (trans, root, path); out:btrfs_release_delayed_iref (node);btrfs_release_path (path);
Signature · 1 line
2.34.1
Quoted 6 lines · On 2023/2/18 12:36, void0red wrote:
Even if the slot is already read out, we may still need to re-balance the tree, thus it can cause error in that
btrfs_del_item()call.Signed-off-by void0red <[email protected]>
Reviewed-by Qu Wenruo <[email protected]>
Thanks,
Qu
Quoted 17 lines
--- fs/btrfs/delayed-inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/btrfs/delayed-inode.c +1
-1@@ -1043,7 +1043,7 @@ static int __btrfs_update_delayed_inode(struct btrfs_trans_handle *trans,* so there is only one iref. The case that several irefs are * in the same item doesn't exist. */ -btrfs_del_item (trans, root, path); + ret =btrfs_del_item (trans, root, path); out:btrfs_release_delayed_iref (node);btrfs_release_path (path);
Quoted 6 lines · On Sat, Feb 18, 2023 at 12:36:48PM +0800, void0red wrote:
Even if the slot is already read out, we may still need to re-balance the tree, thus it can cause error in that
btrfs_del_item()call.Signed-off-by void0red <[email protected]>
Added to misc-next, thanks.