From patchwork Thu May 12 05:26:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Chrisman X-Patchwork-Id: 779002 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4C5T9g8032665 for ; Thu, 12 May 2011 05:29:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753347Ab1ELF3G (ORCPT ); Thu, 12 May 2011 01:29:06 -0400 Received: from mail-pw0-f46.google.com ([209.85.160.46]:59031 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753232Ab1ELF3F (ORCPT ); Thu, 12 May 2011 01:29:05 -0400 Received: by pwi15 with SMTP id 15so568133pwi.19 for ; Wed, 11 May 2011 22:29:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=6IMx3NGm4w4DR2X8eVsh7VumminQFTxu1ufLCDzeCsY=; b=Lx4vkdKr8hxEkhr5zupJ2Gl7UjpaTKXf+Oa/9ncIocI/h3r4+rIXXvWMWAQgPSJAsN or8LuKiUcQgRoxavH3qe6uvqrQOoX5tLnqwD8hNYxnO/5TN2Z2yNCxJxDulQYNfvufgg P9gNo+et3DC2r9BQj+HyqRUPEnG4ddYzmUIdw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=D0s4knw0beEi2AD8rtnh2D45/CtDap+YHPfZODtq0FpgxtpUmZmR76+Ge0XGI7GPOH Ek/3xpSAz/KenzXriaCWTbNDKgSscJKs5CnAhVPdgY92qRwzw9OqBy3Clov5YIzyoaDG 6mw2ldyx3pnkE2K4AnBTlFqbqrSCrm1zjkjLI= Received: by 10.68.20.131 with SMTP id n3mr2870493pbe.445.1305178145269; Wed, 11 May 2011 22:29:05 -0700 (PDT) Received: from localhost.localdomain (70-35-37-146.static.wiline.com [70.35.37.146]) by mx.google.com with ESMTPS id 8sm443489pbw.23.2011.05.11.22.29.04 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 May 2011 22:29:04 -0700 (PDT) From: Brian Chrisman To: ceph-devel@vger.kernel.org Cc: Brian Chrisman Subject: [PATCH 1/2] Add analogous special case for "." directory alongside ".." in _lookup Date: Wed, 11 May 2011 22:26:46 -0700 Message-Id: <1305178007-2927-2-git-send-email-brchrisman@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1305178007-2927-1-git-send-email-brchrisman@gmail.com> References: <1305178007-2927-1-git-send-email-brchrisman@gmail.com> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 12 May 2011 05:29:10 +0000 (UTC) Signed-off-by: Brian Chrisman --- src/client/Client.cc | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 10a6829..6ab4643 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -3267,6 +3267,11 @@ int Client::_lookup(Inode *dir, const string& dname, Inode **target) goto done; } + if (dname == ".") { + *target = dir; + goto done; + } + if (dname.length() > NAME_MAX) { r = -ENAMETOOLONG; goto done;