From: Sage Weil Date: Wed, 3 Mar 2010 17:47:37 +0000 (-0800) Subject: mds: fix null pointer deref in resolve on mostly-empty mds X-Git-Tag: v0.20~357 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0ee0a8d4654dbb14f67cb63be9d41eb7182961dd;p=ceph.git mds: fix null pointer deref in resolve on mostly-empty mds We may not have any dirfrags during resolve if the mds crashed while stopping. --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 129ffb76abee..6571dbdf37e4 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -2033,7 +2033,8 @@ void MDCache::resolve_start() // it owns, so that anything beyond its bounds get left as // unknown. CDir *rootdir = root->get_dirfrag(frag_t()); - adjust_subtree_auth(rootdir, CDIR_AUTH_UNKNOWN); + if (rootdir) + adjust_subtree_auth(rootdir, CDIR_AUTH_UNKNOWN); } set who;