From patchwork Mon May 9 15:39:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Viro X-Patchwork-Id: 9047421 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0F465BF29F for ; Mon, 9 May 2016 15:41:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4329D20142 for ; Mon, 9 May 2016 15:41:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7168220123 for ; Mon, 9 May 2016 15:41:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aznI5-0006eg-Jw; Mon, 09 May 2016 15:40:13 +0000 Received: from [2002:c35c:fd02::1] (helo=ZenIV.linux.org.uk) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aznI1-0005UT-VF for linux-arm-kernel@lists.infradead.org; Mon, 09 May 2016 15:40:11 +0000 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.86_2 #1 (Red Hat Linux)) id 1aznHR-0002XY-5I; Mon, 09 May 2016 15:39:33 +0000 Date: Mon, 9 May 2016 16:39:33 +0100 From: Al Viro To: Tony Lindgren Subject: Re: NFSroot hangs with bad unlock balance in Linux next Message-ID: <20160509153932.GJ2694@ZenIV.linux.org.uk> References: <20160505220344.GE5995@atomide.com> <20160508141629.GF2694@ZenIV.linux.org.uk> <20160509073235.GI2694@ZenIV.linux.org.uk> <20160509151219.GF5995@atomide.com> <20160509152138.GG5995@atomide.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160509152138.GG5995@atomide.com> User-Agent: Mutt/1.6.0 (2016-04-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160509_084010_184850_2DC82476 X-CRM114-Status: GOOD ( 11.58 ) X-Spam-Score: -1.1 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-nfs@vger.kernel.org, Jiri Pirko , netdev , Trond Myklebust , Anna Schumaker , Eric Dumazet , linux-omap@vger.kernel.org, Christoph Hellwig , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 On Mon, May 09, 2016 at 08:21:38AM -0700, Tony Lindgren wrote: > Looks like with both patches applied I still also get this eventually: > > ===================================== > [ BUG: bad unlock balance detected! ] > 4.6.0-rc7-next-20160509+ #1264 Not tainted > ------------------------------------- Lockdep warnings are noise. To make them STFU try the following incremental; I'll fold it into #work.lookups and #for-next. Note that it will do nothing to hangs - those are completely unrelated and you need Eric's patch to deal with them. Tested-by: Tony Lindgren diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c index d367b06..1868246 100644 --- a/fs/nfs/unlink.c +++ b/fs/nfs/unlink.c @@ -64,7 +64,7 @@ static void nfs_async_unlink_release(void *calldata) struct dentry *dentry = data->dentry; struct super_block *sb = dentry->d_sb; - up_read(&NFS_I(d_inode(dentry->d_parent))->rmdir_sem); + up_read_non_owner(&NFS_I(d_inode(dentry->d_parent))->rmdir_sem); d_lookup_done(dentry); nfs_free_unlinkdata(data); dput(dentry); @@ -117,10 +117,10 @@ static int nfs_call_unlink(struct dentry *dentry, struct nfs_unlinkdata *data) struct inode *dir = d_inode(dentry->d_parent); struct dentry *alias; - down_read(&NFS_I(dir)->rmdir_sem); + down_read_non_owner(&NFS_I(dir)->rmdir_sem); alias = d_alloc_parallel(dentry->d_parent, &data->args.name, &data->wq); if (IS_ERR(alias)) { - up_read(&NFS_I(dir)->rmdir_sem); + up_read_non_owner(&NFS_I(dir)->rmdir_sem); return 0; } if (!d_in_lookup(alias)) { @@ -142,7 +142,7 @@ static int nfs_call_unlink(struct dentry *dentry, struct nfs_unlinkdata *data) ret = 0; spin_unlock(&alias->d_lock); dput(alias); - up_read(&NFS_I(dir)->rmdir_sem); + up_read_non_owner(&NFS_I(dir)->rmdir_sem); /* * If we'd displaced old cached devname, free it. At that * point dentry is definitely not a root, so we won't need