]> Pileus Git - ~andy/linux/commit
rbd: don't clean up watch in device release function
authorAlex Elder <elder@inktank.com>
Sat, 27 Apr 2013 14:59:30 +0000 (09:59 -0500)
committerSage Weil <sage@inktank.com>
Thu, 2 May 2013 04:19:59 +0000 (21:19 -0700)
commit0d8189e175380c029a309f05f44e82bacf1c0404
tree2d876fa6d307fd44559545304bc1bcaf87c87965
parent332bb12db9459d52dfcdb278e7607351d2eff6ab
rbd: don't clean up watch in device release function

Currently, a watch on an rbd device header object gets torn down
when its final Linux device reference gets dropped.  Instead, tear
it down when removing the device.  If an error occurs cleaning up
the watch event when unmapping, abort the unmap request.

All images (including parents) still get watch requests set up, so
tear these down also, in rbd_dev_remove_parent().  For now, ignore
any errors that occur in this case.

Get rid of local variable "rc" in rbd_remove(); use "ret" instead
(they both somehow ended up defined in the function and only one is
needed).

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
drivers/block/rbd.c