From: "Yan, Zheng" <zheng.z....@intel.com>

handle_client_openc() calls handle_client_open() if the linkage isn't
null. handle_client_open() calls rdlock_path_pin_ref() which returns
mdr->in[0] directly because mdr->done_locking is true. the problem here
is that mdr->in[0] can be NULL if the linkage is remote.

Signed-off-by: Yan, Zheng <zheng.z....@intel.com>
---
 src/mds/Server.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mds/Server.cc b/src/mds/Server.cc
index 4c66f4a..59d7d3c 100644
--- a/src/mds/Server.cc
+++ b/src/mds/Server.cc
@@ -2637,6 +2637,12 @@ void Server::handle_client_openc(MDRequest *mdr)
       reply_request(mdr, -EEXIST, dnl->get_inode(), dn);
       return;
     } 
+
+    mdcache->request_drop_non_rdlocks(mdr);
+
+    // remote link, avoid rdlock_path_pin_ref() returning null
+    if (!mdr->in[0])
+      mdr->done_locking = false;
     
     handle_client_open(mdr);
     return;
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to