rbd: move ctl_mutex lock inside rbd_get_client()
authorAlex Elder <elder@dreamhost.com>
Sun, 29 Jan 2012 19:57:44 +0000 (13:57 -0600)
committerAlex Elder <elder@dreamhost.com>
Thu, 22 Mar 2012 15:47:47 +0000 (10:47 -0500)
commitd97081b0c7bdb55371994cc6690217bf393eb63e
treea520fd2d821202175749fc9a0dd9b1b4a1fa2ac8
parente6994d3ddedf1a9f35cb43655bb4b5810e71199a
rbd: move ctl_mutex lock inside rbd_get_client()

Since rbd_get_client() is only called in one place, move the
acquisition of the mutex around that call inside that function.

Furthermore, within rbd_get_client(), it appears the mutex only
needs to be held while calling rbd_client_create().  (Moving
the lock inside that function will wait for the next patch.)

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