[PATCH 2/5] mds: fix handle_client_openc() hang

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Yan, Zheng" <zheng.z.yan@xxxxxxxxx>

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.yan@xxxxxxxxx>
---
 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux