rbd: protect against concurrent unmaps
authorAlex Elder <elder@inktank.com>
Fri, 31 May 2013 22:40:44 +0000 (17:40 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2014 20:24:25 +0000 (12:24 -0800)
commit7aa73ee13251af1534de166ea5379f32a6bf7793
treefbd0161f39acac30d75737a5c0e6aab2c080b75f
parentc4d00f5b3e1f48f99d99d813fe8071c719e1790b
rbd: protect against concurrent unmaps

commit 82a442d239695a242c4d584464c9606322cd02aa upstream.

Make sure two concurrent unmap operations on the same rbd device
won't collide, by only proceeding with the removal and cleanup of a
device if is not already underway.

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