From: void0red Date: Sat, 18 Feb 2023 04:36:48 +0000 (+0800) Subject: btrfs: handle btrfs_del_item errors in __btrfs_update_delayed_inode X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c06016a02a6e316d861f7dddd4b70419a47ded2f;p=linux.git 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 and we need to handle it properly. Reviewed-by: Qu Wenruo Signed-off-by: void0red Signed-off-by: David Sterba --- diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index 0095c6e4c3d1c..6b457b010cbc4 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c @@ -1048,7 +1048,7 @@ again: * 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);