From fbdb0a3a0f83e60a477e1b0092b937de51644837 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Thu, 7 Jul 2011 15:28:21 -0700 Subject: [PATCH] mds: check that dnl exists before dereferencing it. Signed-off-by: Greg Farnum --- src/mds/MDCache.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 57439a148da89..eacfab7afa2f7 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -6524,7 +6524,7 @@ int MDCache::path_traverse(MDRequest *mdr, Message *req, Context *fin, // wh } // can we conclude ENOENT? - if (dnl->is_null() && dn->lock.can_read(client)) { + if (dnl && dnl->is_null() && dn->lock.can_read(client)) { dout(12) << "traverse: miss on null+readable dentry " << path[depth] << " " << *dn << dendl; return -ENOENT; } -- 2.39.5