From e2fef38dfdb075a13ac242eeaed7215e80065ee3 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 31 Dec 2012 15:23:29 -0800 Subject: [PATCH] client: fix _create 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 --- src/client/Client.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index aaa1c1614a4..f8028d0e7df 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -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) -- 2.47.3