From: Christoph Hellwig <hch@lst.de>
To: Anton Eidelman <anton.eidelman@gmail.com>
Cc: linux-nvme@lists.infradead.org, hch@lst.de, kbusch@kernel.org,
sagi@grimberg.me, axboe@fb.com,
Anton Eidelman <anton@lightbitslabs.com>
Subject: Re: [PATCH v3 2/2] nvme/mpath: fix crash in nvme_mpath_update for non-ana ctrl
Date: Thu, 24 Mar 2022 07:04:04 +0100 [thread overview]
Message-ID: <20220324060404.GB12261@lst.de> (raw)
In-Reply-To: <20220324003900.1589124-3-anton@lightbitslabs.com>
> diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
> index 12d4afde3662..d36f2543ebe1 100644
> --- a/drivers/nvme/host/multipath.c
> +++ b/drivers/nvme/host/multipath.c
> @@ -712,11 +712,13 @@ static void nvme_ana_work(struct work_struct *work)
>
> void nvme_mpath_update(struct nvme_ctrl *ctrl)
> {
> - u32 nr_change_groups = 0;
> + if (ctrl->ana_log_buf) {
> + u32 nr_change_groups = 0;
>
> - mutex_lock(&ctrl->ana_lock);
> - nvme_parse_ana_log(ctrl, &nr_change_groups, nvme_update_ana_state);
> - mutex_unlock(&ctrl->ana_lock);
> + mutex_lock(&ctrl->ana_lock);
> + nvme_parse_ana_log(ctrl, &nr_change_groups, nvme_update_ana_state);
Overly long line. Kust retun early for the !ana_log_buf case
to sort this out trivially.
prev parent reply other threads:[~2022-03-24 6:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-23 23:43 [PATCH] nvme: fix build error: nvme_mpath_update stub without static Anton Eidelman
2022-03-24 0:30 ` [PATCH v2 0/2] Fix issues with nvme_mpath_update Anton Eidelman
2022-03-24 0:30 ` [PATCH v2 1/2] nvme: fix build error: nvme_mpath_update stub without static Anton Eidelman
2022-03-24 0:30 ` [PATCH v2 2/2] nvme/mpath: fix crash in nvme_mpath_update for non-ana ctrl Anton Eidelman
2022-03-24 0:38 ` [PATCH v3 0/2] Fix issues with nvme_mpath_update Anton Eidelman
2022-03-24 0:38 ` [PATCH v3 1/2] nvme: fix build error: nvme_mpath_update stub without static Anton Eidelman
2022-03-24 6:03 ` Christoph Hellwig
2022-03-24 0:39 ` [PATCH v3 2/2] nvme/mpath: fix crash in nvme_mpath_update for non-ana ctrl Anton Eidelman
2022-03-24 6:04 ` Christoph Hellwig [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=20220324060404.GB12261@lst.de \
--to=hch@lst.de \
--cc=anton.eidelman@gmail.com \
--cc=anton@lightbitslabs.com \
--cc=axboe@fb.com \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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.