]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: take map_sem for read in handle_reply()
authorIlya Dryomov <ilya.dryomov@inktank.com>
Mon, 3 Feb 2014 11:56:33 +0000 (13:56 +0200)
committerSage Weil <sage@inktank.com>
Fri, 7 Feb 2014 18:45:53 +0000 (10:45 -0800)
commit1a1dc377dfb11f1bd33312d0bfdbb3d9e26081b7
treec41312d8926e5f12f4f47426f46cce3da148c0a9
parentc697c7910d4cfb9faf59d3a211ab797dee50788a
libceph: take map_sem for read in handle_reply()

Handling redirect replies requires both map_sem and request_mutex.
Taking map_sem unconditionally near the top of handle_reply() avoids
possible race conditions that arise from releasing request_mutex to be
able to acquire map_sem in redirect reply case.  (Lock ordering is:
map_sem, request_mutex, crush_mutex.)

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
net/ceph/osd_client.c