[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230218043649.86-1-void0red@gmail.com>
Date: Sat, 18 Feb 2023 12:36:48 +0800
From: void0red <void0red@...il.com>
To: dsterba@...e.com
Cc: linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org,
void0red <void0red@...il.com>
Subject: [PATCH] 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.
Link: https://lore.kernel.org/linux-btrfs/9b45f60f-c849-e072-64ef-298937e6a8a3@suse.com/T/#t
Signed-off-by: void0red <void0red@...il.com>
---
fs/btrfs/delayed-inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
index cac5169eaf8d..88a5d893972d 100644
--- a/fs/btrfs/delayed-inode.c
+++ b/fs/btrfs/delayed-inode.c
@@ -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);
--
2.34.1
Powered by blists - more mailing lists