From 3f7ef163c0fbf1a13db243b2f69f78b4aa5eb666 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 26 Jun 2009 16:50:00 -0700 Subject: [PATCH] mds: don't choke on path_traverse_to_dir that fully exists --- src/mds/MDCache.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 8141f6d990e4d..6e80413cbac3a 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -5857,8 +5857,8 @@ bool MDCache::path_is_mine(filepath& path) * * @path - path to traverse (as far as we can) * - * assumes we _don't_ have the full path. (if we do, we throw an assertion.) - * assumes that we are path for the path (we open dirfrags willy-nilly). + * usually we _don't_ have the full path. (if we do, we return NULL.) + * also, if path calls a file a dir, we return NULL. */ CDir *MDCache::path_traverse_to_dir(filepath& path) { @@ -5878,8 +5878,9 @@ CDir *MDCache::path_traverse_to_dir(filepath& path) assert(dnl->is_primary()); cur = dnl->get_inode(); } - assert(0); - //return NULL; // oh, we have the full path. + + // hmm, we DO have the full path. + return NULL; } -- 2.39.5