Linux-NVME Archive on lore.kernel.org
 help / color / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Cc: hch@lst.de, linux-nvme@lists.infradead.org, sagi@grimberg.me
Subject: Re: [PATCH V5 2/4] nvmet: make ctrl model configurable
Date: Thu, 16 Jan 2020 17:40:42 +0100
Message-ID: <20200116164042.GB23501@lst.de> (raw)
In-Reply-To: <20200109050244.5493-3-chaitanya.kulkarni@wdc.com>

> +	down_write(&nvmet_config_sem);
> +	mutex_lock(&subsys->lock);
> +	new_model = rcu_replace_pointer(subsys->model, new_model,
> +					mutex_is_lock(&subsys->lock));
> +	mutex_unlock(&subsys->lock);

Shoudn't this be mutex_is_locked as there is no mutex_is_lock helper..

> +
> +	kfree_rcu(new_model, rcuhead);
> +	up_write(&nvmet_config_sem);

I think the kfree_rcu should move outside nvmet_config_sem to shrink
the critical section.

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

  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09  5:02 [PATCH 0/4] nvmet: misc model, ctrl-id and AEN fixes Chaitanya Kulkarni
2020-01-09  5:02 ` [PATCH V4 1/4] nvmet: make ctrl-id configurable Chaitanya Kulkarni
2020-01-16 16:37   ` Christoph Hellwig
2020-01-09  5:02 ` [PATCH V5 2/4] nvmet: make ctrl model configurable Chaitanya Kulkarni
2020-01-16 16:40   ` Christoph Hellwig [this message]
2020-01-09  5:02 ` [PATCH V2 3/4] nvmet: check sscanf value for subsys serial attr Chaitanya Kulkarni
2020-01-09  5:02 ` [PATCH V2 4/4] nvmet: update AEN list and array at one place Chaitanya Kulkarni
2020-01-16 16:55   ` Christoph Hellwig
2020-01-13 23:52 ` [PATCH 0/4] nvmet: misc model, ctrl-id and AEN fixes Chaitanya Kulkarni

Reply instructions:

You may reply publically 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=20200116164042.GB23501@lst.de \
    --to=hch@lst.de \
    --cc=chaitanya.kulkarni@wdc.com \
    --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

Linux-NVME Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nvme/0 linux-nvme/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nvme linux-nvme/ https://lore.kernel.org/linux-nvme \
		linux-nvme@lists.infradead.org
	public-inbox-index linux-nvme

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-nvme


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git