]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet-fc: perform small cleanups on unneeded checks
authorJames Smart <jsmart2021@gmail.com>
Tue, 31 Mar 2020 16:49:56 +0000 (09:49 -0700)
committerJens Axboe <axboe@kernel.dk>
Sat, 9 May 2020 22:18:34 +0000 (16:18 -0600)
commitbafe5cccf849f1428b52b6153ed800404fdc3494
treea9bc0bd13beee9e3d430654b077bc61c04d469cd
parent739db3df03206b64dfb7362573f0af4062a9def4
nvmet-fc: perform small cleanups on unneeded checks

While code reviewing saw a couple of items that can be cleaned up:
- In nvmet_fc_delete_target_queue(), the routine unlocks, then checks
  and relocks.  Reorganize to avoid the unlock/relock.
- In nvmet_fc_delete_target_queue(), there's a check on the disconnect
  state that is unnecessary as the routine validates the state before
  starting any action.

Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/target/fc.c