From patchwork Fri Oct 25 20:29:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Fields X-Patchwork-Id: 3097451 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A21ADBF925 for ; Fri, 25 Oct 2013 20:30:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C797120320 for ; Fri, 25 Oct 2013 20:30:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DF6D12030B for ; Fri, 25 Oct 2013 20:30:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755167Ab3JYUar (ORCPT ); Fri, 25 Oct 2013 16:30:47 -0400 Received: from fieldses.org ([174.143.236.118]:50206 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754786Ab3JYUan (ORCPT ); Fri, 25 Oct 2013 16:30:43 -0400 Received: from bfields by fieldses.org with local (Exim 4.76) (envelope-from ) id 1VZo1H-0001ZX-CB; Fri, 25 Oct 2013 16:30:07 -0400 From: "J. Bruce Fields" To: linux-fsdevel@vger.kernel.org Cc: Christoph Hellwig , Al Viro , linux-nfs@vger.kernel.org, Christoph Hellwig , "J. Bruce Fields" Subject: [PATCH 1/8] exportfs: BUG_ON in crazy corner case Date: Fri, 25 Oct 2013 16:29:58 -0400 Message-Id: <1382733005-6006-2-git-send-email-bfields@redhat.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1382733005-6006-1-git-send-email-bfields@redhat.com> References: <1382733005-6006-1-git-send-email-bfields@redhat.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Christoph Hellwig This would indicate a nasty bug in the dcache and has never triggered in the past 10 years as far as I know. Signed-off-by: J. Bruce Fields --- fs/exportfs/expfs.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c index c43fe9b..6d0a7fa 100644 --- a/fs/exportfs/expfs.c +++ b/fs/exportfs/expfs.c @@ -112,18 +112,14 @@ reconnect_path(struct vfsmount *mnt, struct dentry *target_dir, char *nbuf) while (target_dir->d_flags & DCACHE_DISCONNECTED && noprogress++ < 10) { struct dentry *pd = find_disconnected_root(target_dir); + BUG_ON(pd == mnt->mnt_sb->s_root); + if (!IS_ROOT(pd)) { /* must have found a connected parent - great */ spin_lock(&pd->d_lock); pd->d_flags &= ~DCACHE_DISCONNECTED; spin_unlock(&pd->d_lock); noprogress = 0; - } else if (pd == mnt->mnt_sb->s_root) { - printk(KERN_ERR "export: Eeek filesystem root is not connected, impossible\n"); - spin_lock(&pd->d_lock); - pd->d_flags &= ~DCACHE_DISCONNECTED; - spin_unlock(&pd->d_lock); - noprogress = 0; } else { /* * We have hit the top of a disconnected path, try to