nvme: don't hold nvmf_transports_rwsem for more than transport lookups
authorJohannes Thumshirn <jthumshirn@suse.de>
Fri, 1 Jun 2018 07:11:20 +0000 (09:11 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 8 Jun 2018 18:51:10 +0000 (12:51 -0600)
commit12a0b662210702c6b0ce9f66f0c177ff1dea99cb
tree1ec47a51a7aa9cfdd5acc59f1970b2523fb76ae4
parentf39ae4719b1c33d048aa4d3c284d82ecf252742b
nvme: don't hold nvmf_transports_rwsem for more than transport lookups

Only take nvmf_transports_rwsem when doing a lookup of registered
transports, so that a blocking ->create_ctrl doesn't prevent other
actions on /dev/nvme-fabrics.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
[hch: increased lock hold time a bit to be safe, added a comment
 and updated the changelog]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/fabrics.c
drivers/nvme/host/fabrics.h