linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Return of btrfs_del_item
@ 2023-02-17 11:47 Kang Chen
  2023-02-18  0:04 ` Qu Wenruo
  0 siblings, 1 reply; 2+ messages in thread
From: Kang Chen @ 2023-02-17 11:47 UTC (permalink / raw)
  To: dsterba; +Cc: linux-btrfs, dsterba

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Return of btrfs_del_item
  2023-02-17 11:47 Return of btrfs_del_item Kang Chen
@ 2023-02-18  0:04 ` Qu Wenruo
  0 siblings, 0 replies; 2+ messages in thread
From: Qu Wenruo @ 2023-02-18  0:04 UTC (permalink / raw)
  To: Kang Chen, dsterba; +Cc: linux-btrfs, dsterba



On 2023/2/17 19:47, Kang Chen wrote:
> 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

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-18  0:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-17 11:47 Return of btrfs_del_item Kang Chen
2023-02-18  0:04 ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).