From: John Spray Date: Thu, 13 Mar 2014 16:24:12 +0000 (+0000) Subject: mds: Return EINVAL for parent lookup on root ino X-Git-Tag: v0.79~95^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f1f2826876943d3e6a48fc52c9bd229cbc043dd1;p=ceph.git mds: Return EINVAL for parent lookup on root ino This was the behaviour before 8d6b25a1, and distinguishes the general failure to find a parent (ESTALE) from the specific case of a node being present but being the base (EINVAL) Signed-off-by: John Spray --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index a1327662d9b2..4e46f976d803 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -2401,6 +2401,10 @@ void Server::handle_client_lookup_ino(MDRequest *mdr, bool want_parent, bool wan } if (want_parent) { + if (in->is_base()) { + reply_request(mdr, -EINVAL); + return; + } if (!diri || diri->is_stray()) { reply_request(mdr, -ESTALE); return;