[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YSkv1GtmFgvQ81Up@bombadil.infradead.org>
Date: Fri, 27 Aug 2021 11:32:52 -0700
From: Luis Chamberlain <mcgrof@...nel.org>
To: Christoph Hellwig <hch@...radead.org>
Cc: axboe@...nel.dk, martin.petersen@...cle.com, jejb@...ux.ibm.com,
kbusch@...nel.org, sagi@...mberg.me, adrian.hunter@...el.com,
beanhuo@...ron.com, ulf.hansson@...aro.org, avri.altman@....com,
swboyd@...omium.org, agk@...hat.com, snitzer@...hat.com,
josef@...icpanda.com, hare@...e.de, bvanassche@....org,
ming.lei@...hat.com, linux-scsi@...r.kernel.org,
linux-nvme@...ts.infradead.org, linux-mmc@...r.kernel.org,
dm-devel@...hat.com, nbd@...er.debian.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 05/10] nvme: add error handling support for add_disk()
On Tue, Aug 24, 2021 at 07:09:37AM +0100, Christoph Hellwig wrote:
> On Mon, Aug 23, 2021 at 01:29:25PM -0700, Luis Chamberlain wrote:
> > + rc = device_add_disk(ctrl->device, ns->disk, nvme_ns_id_attr_groups);
> > + if (rc)
> > + goto out_cleanup_ns_from_list;
> > +
>
> Nit: no real need for the rc variable here as we never use the actual
> value.
Alrighty.
> > if (!nvme_ns_head_multipath(ns->head))
> > nvme_add_ns_cdev(ns);
> >
> > @@ -3785,6 +3789,10 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid,
> >
> > return;
> >
> > + out_cleanup_ns_from_list:
> > + down_write(&ctrl->namespaces_rwsem);
> > + list_del_init(&ns->list);
> > + up_write(&ctrl->namespaces_rwsem);
>
> This also needs to do a nvme_put_ctrl.
Fixed.
Luis
Powered by blists - more mailing lists