]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: cope with non-mdr request in path_traverse
authorSage Weil <sage@newdream.net>
Thu, 12 Mar 2009 18:30:52 +0000 (11:30 -0700)
committerSage Weil <sage@newdream.net>
Thu, 12 Mar 2009 21:20:05 +0000 (14:20 -0700)
For example, an MDiscover.

src/mds/MDCache.cc

index fbd4ca6bc54a8d73834d22ad822920c75de8569a..d87a9e65e77e076231782e728aad87e20a1d7499 100644 (file)
@@ -5233,7 +5233,7 @@ int MDCache::path_traverse(MDRequest *mdr, Message *req,     // who
   if (psnapdiri)
     *psnapdiri = 0;
 
-  int client = mdr->reqid.name.is_client() ? mdr->reqid.name.num() : -1;
+  int client = (mdr && mdr->reqid.name.is_client()) ? mdr->reqid.name.num() : -1;
 
   // root
   CInode *cur = get_inode(origpath.get_ino());