Return of btrfs_del_item
I found that the return value of btrfs_del_item is handled elsewhere, is it needed here?
Maybe we should save the return value to ret and abort the transaction later.
https://elixir.bootlin.com/linux/v6.0.1/source/fs/btrfs/delayed-inode.c#L1075
Quoted 5 lines · Kang Chen
I found that the return value of
btrfs_del_itemis handled elsewhere, is it needed here?
Maybe we should save the return value toretand abort the transaction later.https://elixir.bootlin.com/linux/v6.0.1/source/fs/btrfs/delayed-inode.c#L1075
It looks like a missing error handling.
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.
Feel free to add error handling to the call site.
Thanks,
Qu