From: fdmanana@kernel.org
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v2 0/2] btrfs: fix lost error value deleting root reference
Date: Mon, 22 Aug 2022 15:47:08 +0100 [thread overview]
Message-ID: <cover.1661179270.git.fdmanana@suse.com> (raw)
In-Reply-To: <cover.1661168931.git.fdmanana@suse.com>
From: Filipe Manana <fdmanana@suse.com>
Fix a silent failure in case deleting a root reference fails when searching
for an item. Then make btrfs_del_root_ref() less likely to run into such
type of bug in the future. Details in the changelogs.
V2: Fix patch 2/2. If the BTRFS_ROOT_BACKREF_KEY item is not found, but
the BTRFS_ROOT_REF_KEY is found, then before we would return -ENOENT
and now we were returning 0 (unless an error happened when deleting
the BTRFS_ROOT_REF_KEY item). Just return -ENOENT whenever one of
the items is not found, all the callers abort the transaction if
btrfs_del_root_ref() returns an error.
Filipe Manana (2):
btrfs: fix silent failure when deleting root reference
btrfs: simplify error handling at btrfs_del_root_ref()
fs/btrfs/root-tree.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
--
2.35.1
next prev parent reply other threads:[~2022-08-22 14:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-22 11:53 [PATCH 0/2] btrfs: fix lost error value deleting root reference fdmanana
2022-08-22 11:53 ` [PATCH 1/2] btrfs: fix silent failure when " fdmanana
2022-08-22 11:53 ` [PATCH 2/2] btrfs: simplify error handling at btrfs_del_root_ref() fdmanana
2022-08-22 14:47 ` fdmanana [this message]
2022-08-22 14:47 ` [PATCH v2 1/2] btrfs: fix silent failure when deleting root reference fdmanana
2022-08-22 23:47 ` Qu Wenruo
2022-08-23 8:11 ` Filipe Manana
2022-08-23 17:15 ` David Sterba
2022-08-22 14:47 ` [PATCH v2 2/2] btrfs: simplify error handling at btrfs_del_root_ref() fdmanana
2022-08-22 23:54 ` Qu Wenruo
2022-08-23 8:09 ` Filipe Manana
2022-08-22 18:30 ` [PATCH v2 0/2] btrfs: fix lost error value deleting root reference David Sterba
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=cover.1661179270.git.fdmanana@suse.com \
--to=fdmanana@kernel.org \
--cc=linux-btrfs@vger.kernel.org \
/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