]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix _create
authorSage Weil <sage@inktank.com>
Mon, 31 Dec 2012 23:23:29 +0000 (15:23 -0800)
committerSage Weil <sage@inktank.com>
Mon, 31 Dec 2012 23:26:53 +0000 (15:26 -0800)
make_request() clear out req->reply and frees req; we can't inspect
it here.

Instead, just assume that extra_bl is the create flag/ino if it is
present.  Old code does not include an extra_bl on CREATE, and new code
will have the same first bytes for compatibility.

Signed-off-by: Sage Weil <sage@inktank.com>
src/client/Client.cc

index aaa1c1614a45fae9ea5e2444ef9dfee7a9ddd792..f8028d0e7df0bbf0901ef13c64a226ce7c504c1b 100644 (file)
@@ -6682,11 +6682,8 @@ int Client::_create(Inode *dir, const char *name, int flags, mode_t mode, Inode
     goto reply_error;
   }
 
-  // make sure we have a reply to inspect
-  assert(req->reply);
-
   // check whether this request actually did the create, and set created flag
-  if (req->reply->get_connection()->has_feature(CEPH_FEATURE_REPLY_CREATE_INODE) && extra_bl.length() == 1) {
+  if (extra_bl.length() == 1) {
     // if the extra bufferlist has a buffer, we assume its the created inode
     // and that this request to create succeeded in actually creating
     // the inode (won the race with other create requests)