Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3789384img; Mon, 25 Mar 2019 18:32:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwsFaU4D8yb4vzR6Zinon5/ldpVO/xp3TPSfGKEGxbZ0u4387lzogIM0wDOURHRr2xXNu46 X-Received: by 2002:a62:5142:: with SMTP id f63mr27320849pfb.57.1553563962730; Mon, 25 Mar 2019 18:32:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553563962; cv=none; d=google.com; s=arc-20160816; b=OciFoqwgrPwQhLP7H50kO1LdLmnOgHgrxkTKzs/mN1ySOoEHM29HUXi5mkrZ3fx2sg KQkVRjOL4pf53G//8Nqbsnw+OButHCwf5J5CyF3J3bm4OUVCBaUs6tsww5PUPqn1xdz+ zFplBVKlTHgPeQaEQ24QKtC6o2H5bcKJ95x/TzSeObsUfHzikynr2LuJN/WcIX8HVLJD 9/2KE688VnPBfHj754h9W3Ms4HgI6D9kNYC/C9apW2bpcfDVz9kWuUqSJtso6VAYcGfk pCc+1lBWi3ezIGvF/p9GeRTApW3uA0vPFVvk0kHrGp/tWpgoPFcLdWaR57ZVc0m91vzI BB5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=tdm4kUVwRv59qSDHvAoTyD42PqoAlDl7I0KVJx/HZnM=; b=rFZQocodz6ndMmzdaBc85+ybC1laX/CA9KykDwBfgG3HgIzkj8+b8yz6d0Nc4r4GaZ RLm2dMUfL2ntPpnwk+uCQIeZsjZSAPZc4KQ83MWOVV7SX76zLDlG9/RhH68jL+mmPwI2 FF/G+tC7AXtSezvnKJR02t+YC+FPyP6VSaVshnU6ZVHvuJ6vb6a/1PCzZcmd47ojvq6K NlgDzqkaR3woVff6kuY/IK8HRDwRGgDaaOcy7VNDmLPM1flOHirMhVNHlxydnDkfptsc 1NT2rePxvYi+5V/RhJGWX/e/Q7+8gP/DYkiXjFtcrrIvMTjp4xSwd10YyzL+f4f7M301 HkrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xhFH9rlv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h23si14690675pgv.190.2019.03.25.18.32.27; Mon, 25 Mar 2019 18:32:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xhFH9rlv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730615AbfCZBbB (ORCPT + 99 others); Mon, 25 Mar 2019 21:31:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:35830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727427AbfCZBbA (ORCPT ); Mon, 25 Mar 2019 21:31:00 -0400 Received: from localhost (li1825-44.members.linode.com [172.104.248.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 08BFC20848; Tue, 26 Mar 2019 01:30:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553563860; bh=CIiGuw14V9Ne/GstDE3gc6mLNsCWg8WK7qCRAS8vVg0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xhFH9rlvEeJEZz1bgYEfyQFuQAWXl0dbgKyyoAPYw63pi9NxhUV3eUfizh+2ocOAH O9BIQIY1ya9coJM1OJEN3D62AjnBGYY+9ghAS+UPCs0RRuRsP1zlQAjCvEnjoVTIOU C6x7UGTQDnQ4mB2K6HuYw2OfAsa9ujjaVSGyLOkg= Date: Tue, 26 Mar 2019 10:30:53 +0900 From: Greg KH To: Arnd Bergmann Cc: stable@vger.kernel.org, Alexander Viro , Andrew Morton , Roman Gushchin , Waiman Long , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [BACKPORT 4.4.y 20/25] Hang/soft lockup in d_invalidate with simultaneous calls Message-ID: <20190326013053.GA21198@kroah.com> References: <20190322154425.3852517-1-arnd@arndb.de> <20190322154425.3852517-21-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190322154425.3852517-21-arnd@arndb.de> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 22, 2019 at 04:44:11PM +0100, Arnd Bergmann wrote: > From: Al Viro > > It's not hard to trigger a bunch of d_invalidate() on the same > dentry in parallel. They end up fighting each other - any > dentry picked for removal by one will be skipped by the rest > and we'll go for the next iteration through the entire > subtree, even if everything is being skipped. Morevoer, we > immediately go back to scanning the subtree. The only thing > we really need is to dissolve all mounts in the subtree and > as soon as we've nothing left to do, we can just unhash the > dentry and bugger off. > > Signed-off-by: Al Viro > (cherry picked from commit 81be24d263dbeddaba35827036d6f6787a59c2c3) > Signed-off-by: Arnd Bergmann > --- > fs/dcache.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) Also added to 4.9.y