]> git.baikalelectronics.ru Git - kernel.git/commit
rbd: don't test rbd_dev->opts in rbd_dev_image_release()
authorIlya Dryomov <idryomov@gmail.com>
Mon, 16 Mar 2020 16:16:28 +0000 (17:16 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 13 Apr 2020 06:55:49 +0000 (08:55 +0200)
commit2c3b5ba458587d5fe74eaa3a7fd1448db071c618
treee11ac47ff54f5db33102937957b74627a1b9a449
parentc5f381db40eae98e14005762f837e3351e09084b
rbd: don't test rbd_dev->opts in rbd_dev_image_release()

rbd_dev->opts is used to distinguish between the image that is being
mapped and a parent.  However, because we no longer establish watch for
read-only mappings, this test is imprecise and results in unnecessary
rbd_unregister_watch() calls.

Make it consistent with need_watch in rbd_dev_image_probe().

Fixes: 7c16ab3cce47 ("rbd: don't establish watch for read-only mappings")
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
drivers/block/rbd.c