]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: fix locking in Client::getcwd 17205/head
authorJeff Layton <jlayton@redhat.com>
Wed, 23 Aug 2017 17:49:40 +0000 (13:49 -0400)
committerJeff Layton <jlayton@redhat.com>
Wed, 23 Aug 2017 17:49:40 +0000 (13:49 -0400)
commit72909729254f70f3d8c6ec4191b1fead2212f3ed
treece31bc885a1687147a9198defe62062a4d4047f2
parentaaed30f523c07fd501ea8fcb9365a8284c66c347
client: fix locking in Client::getcwd

Currently, it doesn't take the client_lock at all, which is problematic
as make_request may very well end up unlocking it. Rename the current
function to _getcwd, and add a new getcwd wrapper that takes the mutex
before calling _getcwd.

This fixes: http://tracker.ceph.com/issues/21082

Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/client/Client.cc
src/client/Client.h