All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
To: "fdmanana@kernel.org" <fdmanana@kernel.org>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] btrfs: zoned: fix wrong mutex unlock on failure to allocate log root tree
Date: Wed, 7 Jul 2021 15:07:11 +0000	[thread overview]
Message-ID: <PH0PR04MB74161D79160D1E8463F05D899B1A9@PH0PR04MB7416.namprd04.prod.outlook.com> (raw)
In-Reply-To: 11314a6ca7a70deee42785d3ee79c97813b528ab.1625656963.git.fdmanana@suse.com

On 07/07/2021 13:23, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> When syncing the log, if we fail to allocate the root node for the log
> root tree:
> 
> 1) We are unlocking fs_info->tree_log_mutex, but at this point we have
>    not yet locked this mutex;
> 
> 2) We have locked fs_info->tree_root->log_mutex, but we end up not
>    unlocking it;
> 
> So fix this by unlocking fs_info->tree_root->log_mutex instead of
> fs_info->tree_log_mutex.
> 
> Fixes: e75f9fd194090e ("btrfs: zoned: move log tree node allocation out of log_root_tree->log_mutex")
> CC: stable@vger.kernel.org # 5.13+
> Signed-off-by: Filipe Manana <fdmanana@suse.com>

Good catch!
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

  parent reply	other threads:[~2021-07-07 15:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-07 11:23 [PATCH] btrfs: zoned: fix wrong mutex unlock on failure to allocate log root tree fdmanana
2021-07-07 12:01 ` Nikolay Borisov
2021-07-07 15:07 ` Johannes Thumshirn [this message]
2021-07-07 17:32 ` 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=PH0PR04MB74161D79160D1E8463F05D899B1A9@PH0PR04MB7416.namprd04.prod.outlook.com \
    --to=johannes.thumshirn@wdc.com \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.