]> git.baikalelectronics.ru Git - kernel.git/commit
rbd: handle locking inside __rbd_client_find()
authorAlex Elder <elder@inktank.com>
Fri, 10 Aug 2012 20:12:07 +0000 (13:12 -0700)
committerAlex Elder <elder@inktank.com>
Mon, 1 Oct 2012 19:30:49 +0000 (14:30 -0500)
commit018642a79b06ff11c063b07b49c1cf21b06d4993
treeddc5c41d5d572933ef4a4f5dcd36138f069c5bc9
parentdb66a61b3c3ef856a1a2d1d078b8f9a826b64991
rbd: handle locking inside __rbd_client_find()

There is only caller of __rbd_client_find(), and it somewhat
clumsily gets the appropriate lock and gets a reference to the
existing ceph_client structure if it's found.

Instead, have that function handle its own locking, and acquire the
reference if found while it holds the lock.  Drop the underscores
from the name because there's no need to signify anything special
about this function.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
drivers/block/rbd.c