diff options
author | Christoph Hellwig <hch@lst.de> | 2021-08-25 18:31:07 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-08-25 22:20:29 +0200 |
commit | 438cd318c8dfa5228ffd43af1b98d7cd7d92e1c6 (patch) | |
tree | d70ba2194a286f02d8fe8359289e6db73c692a4a /drivers/block/paride | |
parent | nbd: set nbd->index before releasing nbd_index_mutex (diff) | |
download | linux-438cd318c8dfa5228ffd43af1b98d7cd7d92e1c6.tar.xz linux-438cd318c8dfa5228ffd43af1b98d7cd7d92e1c6.zip |
nbd: only return usable devices from nbd_find_unused
Device marked as NBD_DESTROY_ON_DISCONNECT can and should be skipped
given that they won't survive the disconnect. So skip them and try
to grab a reference directly and just continue if the the devices
is being torn down or created and thus has a zero refcount.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210825163108.50713-6-hch@lst.de
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/paride')
0 files changed, 0 insertions, 0 deletions