]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: a checker function like _is_dir_nonempty should only report results.
authorGreg Farnum <gregf@hq.newdream.net>
Thu, 10 Jun 2010 16:05:29 +0000 (09:05 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Thu, 10 Jun 2010 16:06:37 +0000 (09:06 -0700)
Remove the call to reply_request and fix up the callers that need it.

src/mds/Server.cc

index 29d0a32ac1543302a431138a70d0fe3272818356..34c9735d6664608ed36d3aa9ec647ff746496c23 100644 (file)
@@ -3976,7 +3976,6 @@ bool Server::_dir_is_nonempty(MDRequest *mdr, CInode *in)
               << dir->inode->get_projected_inode()->dirstat.size()
               << " on " << *dir->inode
               << dendl;
-      reply_request(mdr, -ENOTEMPTY);
       return true;
     }
 
@@ -4070,8 +4069,11 @@ void Server::handle_client_rename(MDRequest *mdr)
     }
 
     // non-empty dir?
-    if (oldin->is_dir() && _dir_is_nonempty(mdr, oldin))      
+    if (oldin->is_dir() && _dir_is_nonempty(mdr, oldin)) {
+      reply_request(mdr, -ENOTEMPTY);
       return;
+    }
+    return;
   }
 
   // -- some sanity checks --