OSDN Git Service

nbd: return the allocated nbd_device from nbd_dev_add
authorChristoph Hellwig <hch@lst.de>
Wed, 11 Aug 2021 12:44:26 +0000 (14:44 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 13 Aug 2021 20:17:37 +0000 (14:17 -0600)
commit7bdc00cf7e369b3be17f26e5643da28de98d9d6d
treeb6aa51a0dd72533cf0311de9c224c9db2813d1ae
parent327b501b1d94342fe17a1b6b1a40746e57ddd472
nbd: return the allocated nbd_device from nbd_dev_add

Return the device we just allocated instead of doing an extra search for
it in the caller.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210811124428.2368491-5-hch@lst.de
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/nbd.c