]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix bad EINVAL error code in unlink
authorSage Weil <sage@newdream.net>
Thu, 30 Oct 2008 18:48:39 +0000 (11:48 -0700)
committerSage Weil <sage@newdream.net>
Thu, 30 Oct 2008 18:48:39 +0000 (11:48 -0700)
src/mds/Server.cc

index ef6af76144a6818c2c7632b8971fe3985153435a..18706b9eb048148c3c20e3d38852babdb87fff96 100644 (file)
@@ -2838,7 +2838,7 @@ void Server::handle_client_unlink(MDRequest *mdr)
                                 req->get_filepath(), trace, NULL, NULL,
                                 false, MDS_TRAVERSE_FORWARD);
   if (r > 0) return;
-  if (trace.empty()) r = -EINVAL;   // can't unlink root
+  if (r == 0 && trace.empty()) r = -EINVAL;   // can't unlink root
   if (r < 0) {
     reply_request(mdr, r);
     return;