summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-05-29 15:24:39 +0200
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-05-31 19:15:23 +0200
commitc0e3d04bb83361017c2f766d013161aa659264e8 (patch)
treef87b865ad49686fc5f3bc72c493e2f874e3687f9
parent91f6b0f04bd716983dd9cef607295545b06bd6d3 (diff)
downloadceph-c0e3d04bb83361017c2f766d013161aa659264e8.tar.gz
mds/MDCache.cc: fix dereference null return value
Add assert to fix: CID 716994 (#1 of 1): Dereference null return value (NULL_RETURNS) dereference: Dereferencing a pointer that might be null "dir" when calling "CDir::mark_dirty(version_t, LogSegment *)". Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
-rw-r--r--src/mds/MDCache.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc
index 330e69507d9..8c17172e5c4 100644
--- a/src/mds/MDCache.cc
+++ b/src/mds/MDCache.cc
@@ -496,6 +496,7 @@ void MDCache::_create_system_file_finish(Mutation *mut, CDentry *dn, version_t d
CDir *dir = 0;
if (in->inode.is_dir()) {
dir = in->get_dirfrag(frag_t());
+ assert(dir);
dir->mark_dirty(1, mut->ls);
dir->mark_new(mut->ls);
}