nvmet-fc: move RCU read lock to nvmet_fc_assoc_exists
authorDaniel Wagner <dwagner@suse.de>
Thu, 4 Apr 2024 14:41:30 +0000 (16:41 +0200)
committerKeith Busch <kbusch@kernel.org>
Thu, 4 Apr 2024 15:47:56 +0000 (08:47 -0700)
commitdb67bb39eff0fc5db21f49f8ae93e67ed2c5fe01
treebf0b9548c62654474ef1b40436c5cabed411e00b
parent95409e277d8343810adf8700d29d4329828d452b
nvmet-fc: move RCU read lock to nvmet_fc_assoc_exists

The RCU lock is only needed for the lookup loop and not for
list_ad_tail_rcu call. Thus move it down the call chain into
nvmet_fc_assoc_exists.

While at it also fix the name typo of the function.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/target/fc.c