]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
client: fix locking in Client::getcwd 17235/head
authorJeff Layton <jlayton@redhat.com>
Wed, 23 Aug 2017 17:49:40 +0000 (13:49 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 24 Aug 2017 16:39:09 +0000 (09:39 -0700)
commit925466b4983c36dcbb3744220a32856e9ff735b0
treee89a11f9616efe53574806d1b5d73069a51a966e
parentd79b443b619a820add2084e110490f3631793437
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>
(cherry picked from commit 72909729254f70f3d8c6ec4191b1fead2212f3ed)
src/client/Client.cc
src/client/Client.h