]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: allow revalidate to set a namespace read-only
authorChristoph Hellwig <hch@lst.de>
Sat, 9 Jan 2021 10:42:54 +0000 (11:42 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jan 2021 01:15:57 +0000 (18:15 -0700)
commit08fdb19f854a436f7db6c55b31829a2b1ceae4c8
treecefec5c99d3e3d0b3fce3227d6c7a2a66321c33a
parent5ebdf257c5df1ade121a4eb9dfb897286a3a8637
nvme: allow revalidate to set a namespace read-only

Unconditionally call set_disk_ro now that it only updates the hardware
state.  This allows to properly set up the Linux devices read-only when
the controller turns a previously writable namespace read-only.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c