summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-05-31 15:17:01 -0500
committerSage Weil <sage@inktank.com>2013-07-03 15:32:41 -0700
commit751cc0e3cfabdda87c4c21519253c6751e97a8d4 (patch)
tree8d4761447d8b8c2e8da9b7d6dd83e9bb8a63bc6e /usr
parent4974341eb99861720d54db9337bf1fe78eb8b9d0 (diff)
downloadlinux-751cc0e3cfabdda87c4c21519253c6751e97a8d4.tar.gz
rbd: set removing flag while holding list lock
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>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions