From patchwork Thu Jun 10 11:38:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henry C Chang X-Patchwork-Id: 105374 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5ABYFUR010018 for ; Thu, 10 Jun 2010 11:38:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753999Ab0FJLiR (ORCPT ); Thu, 10 Jun 2010 07:38:17 -0400 Received: from mail-vw0-f46.google.com ([209.85.212.46]:52714 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753601Ab0FJLiR (ORCPT ); Thu, 10 Jun 2010 07:38:17 -0400 Received: by vws17 with SMTP id 17so3705197vws.19 for ; Thu, 10 Jun 2010 04:38:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.113.4 with SMTP id y4mr46006qap.123.1276169894613; Thu, 10 Jun 2010 04:38:14 -0700 (PDT) Received: by 10.229.142.140 with HTTP; Thu, 10 Jun 2010 04:38:14 -0700 (PDT) X-Originating-IP: [122.146.30.126] In-Reply-To: References: Date: Thu, 10 Jun 2010 19:38:14 +0800 Message-ID: Subject: Re: cmds segfault on pdj-fstest (ceph.git unstable) From: Henry C Chang To: Thomas Mueller Cc: ceph-devel@vger.kernel.org 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.3 (demeter.kernel.org [140.211.167.41]); Thu, 10 Jun 2010 11:38:18 +0000 (UTC) =========================================== diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 29d0a32..4a90f4e 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -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,10 @@ 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; + } } // -- some sanity checks --