]> git.baikalelectronics.ru Git - kernel.git/commit
nbd: add device refcounting
authorJosef Bacik <josef@toxicpanda.com>
Thu, 6 Apr 2017 21:02:06 +0000 (17:02 -0400)
committerJens Axboe <axboe@fb.com>
Mon, 17 Apr 2017 15:58:42 +0000 (09:58 -0600)
commit6aa72280cb42c722065e67a72f9a76e844290855
treea2a16f24b4ddf730ab97e385d6f8cd32163a39c1
parent68b5d1db90bfd694b01aab69105e3c1e6b5a5804
nbd: add device refcounting

In order to support deleting the device on disconnect we need to
refcount the actual nbd_device struct.  So add the refcounting framework
and change how we free the normal devices at rmmod time so we can catch
reference leaks.

Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/nbd.c