linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Minwoo Im <minwoo.im.dev@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-block@vger.kernel.org, kbusch@kernel.org,
	javier@javigon.com, sagi@grimberg.me,
	linux-nvme@lists.infradead.org
Subject: Re: [PATCH V5 2/2] nvme: allow open for nvme-generic char device
Date: Thu, 25 Feb 2021 03:44:41 +0900	[thread overview]
Message-ID: <20210224184441.GA2626@localhost.localdomain> (raw)
In-Reply-To: <20210224164523.GB11338@lst.de>

On 21-02-24 17:45:23, Christoph Hellwig wrote:
> On Mon, Feb 22, 2021 at 08:01:07PM +0100, javier@javigon.com wrote:
> > @@ -1885,7 +1885,7 @@ static int nvme_ns_open(struct nvme_ns *ns)
> >  {
> >  #ifdef CONFIG_NVME_MULTIPATH
> >  	/* should never be called due to GENHD_FL_HIDDEN */
> > -	if (WARN_ON_ONCE(ns->head->disk))
> > +	if (WARN_ON_ONCE(!nvme_ns_is_generic(ns) && ns->head->disk))
> >  		goto fail;
> 
> Maybe just move the check into the block device caller instead?

Sure, then check for nvme_ns_is_generic(ns) will be not neccessary.  Let
me move this check to nvme_open() with only checking if it's head or not.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

      reply	other threads:[~2021-02-24 18:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22 19:01 [PATCH V5 0/2] nvme: enable char device per namespace javier
2021-02-22 19:01 ` [PATCH V5 1/2] " javier
2021-02-24 16:44   ` Christoph Hellwig
2021-02-24 20:28     ` Javier González
2021-02-22 19:01 ` [PATCH V5 2/2] nvme: allow open for nvme-generic char device javier
2021-02-24 16:45   ` Christoph Hellwig
2021-02-24 18:44     ` Minwoo Im [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=20210224184441.GA2626@localhost.localdomain \
    --to=minwoo.im.dev@gmail.com \
    --cc=hch@lst.de \
    --cc=javier@javigon.com \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).