]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: do not retake lock in sync_write_commit
authorSage Weil <sage@newdream.net>
Thu, 19 May 2011 17:39:36 +0000 (10:39 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Thu, 19 May 2011 17:14:29 +0000 (10:14 -0700)
We already hold the lock from a few frames up the stack (ms_dispatch).

Reported-by: Simon Tian <aixt2006@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
src/client/Client.cc

index 7f7fb0839d37bbb26b6dae78c85ff634e68866d7..bf0997abb4f4c58e3e6b95aa366b565d3fcfcc63 100644 (file)
@@ -4934,7 +4934,6 @@ public:
 
 void Client::sync_write_commit(Inode *in)
 {
-  client_lock.Lock();
   assert(unsafe_sync_write > 0);
   unsafe_sync_write--;
 
@@ -4947,8 +4946,6 @@ void Client::sync_write_commit(Inode *in)
   }
 
   put_inode(in);
-
-  client_lock.Unlock();
 }
 
 int Client::write(int fd, const char *buf, loff_t size, loff_t offset)