From: Qu Wenruo <wqu@suse.com>
To: Kang Chen <void0red@gmail.com>, dsterba@suse.com
Cc: linux-btrfs@vger.kernel.org, dsterba@suse.cz
Subject: Re: Return of btrfs_del_item
Date: Sat, 18 Feb 2023 08:04:56 +0800 [thread overview]
Message-ID: <9b45f60f-c849-e072-64ef-298937e6a8a3@suse.com> (raw)
In-Reply-To: <CANE+tVrwoRxcOqK5vJCzEJonD9Z=80mdXUqvE3RoOcrVgRhrBw@mail.gmail.com>
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
prev parent reply other threads:[~2023-02-18 0:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 11:47 Return of btrfs_del_item Kang Chen
2023-02-18 0:04 ` Qu Wenruo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9b45f60f-c849-e072-64ef-298937e6a8a3@suse.com \
--to=wqu@suse.com \
--cc=dsterba@suse.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=void0red@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox