rbd: tie rbd_dev_list changes to rbd_id operations
authorAlex Elder <elder@dreamhost.com>
Thu, 2 Feb 2012 14:13:29 +0000 (08:13 -0600)
committerAlex Elder <elder@dreamhost.com>
Thu, 22 Mar 2012 15:47:47 +0000 (10:47 -0500)
commit499afd5b8e742792fda6bd7730c738ad83aecf6b
treea3cac0fa73a3251e80d8c6eb2e0eb9addbcc5e22
parente124a82f3c4efc2cc2bae68a2bf30020fb8c4fc2
rbd: tie rbd_dev_list changes to rbd_id operations

The only time entries are added to or removed from the global
rbd_dev_list is exactly when a "put" or "get" operation is being
performed on a rbd_dev's id.  So just move the list management code
into get/put routines.

Signed-off-by: Alex Elder <elder@dreamhost.com>
Signed-off-by: Sage Weil <sage@newdream.net>
drivers/block/rbd.c