rbd: move rbd_unregister_watch() call into rbd_dev_image_release()
authorIlya Dryomov <idryomov@gmail.com>
Thu, 13 Apr 2017 10:17:37 +0000 (12:17 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 4 May 2017 07:19:23 +0000 (09:19 +0200)
commitfd22aef8b47cfc068448df65c1183698b0abd815
treebb0059af80d5aedb2c4b124eb3e1b23f1e40ffea
parent8b679ec5257eeb3d73b71a613cad2769f21c86ad
rbd: move rbd_unregister_watch() call into rbd_dev_image_release()

rbd_dev->disk tear down vs rbd_watch_cb() race shouldn't be a problem
anymore thanks to EXISTS and REMOVING checks in rbd_dev_update_size().
A similar race could occur on "rbd map", see commit 811c66887746
("rbd: fix rbd map vs notify races").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
drivers/block/rbd.c