aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-05-31 15:17:01 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-09 12:24:25 -0800
commitc4d00f5b3e1f48f99d99d813fe8071c719e1790b (patch)
tree8544dd8b6649ea65ccf09ad47204326be90b8bbd /tools
parent350505e73f8c4d03dfef660f40a6f35d5ac12be6 (diff)
rbd: set removing flag while holding list lock
commit 751cc0e3cfabdda87c4c21519253c6751e97a8d4 upstream. When unmapping a device, its id is supplied, and that is used to look up which rbd device should be unmapped. Looking up the device involves searching the rbd device list while holding a spinlock that protects access to that list. Currently all of this is done under protection of the control lock, but that protection is going away soon. To ensure the rbd_dev is still valid (still on the list) while setting its REMOVING flag, do so while still holding the list lock. To do so, get rid of __rbd_get_dev(), and open code what it did in the one place it was used. 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>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions