Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3221690rwb; Mon, 15 Aug 2022 21:31:07 -0700 (PDT) X-Google-Smtp-Source: AA6agR7cYxXjQY6WVJP28vm3i9VXPkxFYvK6SH0mHtWlBnXWY3wa9Dw9WIvMuvtbOOeeiygj83zl X-Received: by 2002:a17:907:2ccd:b0:731:53bc:6a6b with SMTP id hg13-20020a1709072ccd00b0073153bc6a6bmr12185002ejc.40.1660624266849; Mon, 15 Aug 2022 21:31:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660624266; cv=none; d=google.com; s=arc-20160816; b=fzbduATs57UgfnfrRE476m95YTJXafgdxvQsQtKdaSVgaKczqWf7QGo+mXfc76D/0b X8a+r8vAi2gFx2sNrwk6miQMYE52CD1Y5XA9jAhYsMISKBhgpGSgpub5Lx39+QYGFYAy 9Er0SRxFy0X22Vm8/x9GmLnzhiURHk+jT4DTQY53IVmowar11ixdoLTK2Bj8nhwrn5/Z q4OyT5q0q4jppeSC4zqXUqgiinOgNzj4rUG0ehQnbStRMZ5TJZjSIom+vCZpqUWg25VS /7XowtAvb+lzf00F8v9hyTZ0tZV0O7iRbya6UConxr6S2WNDXKn3QGuF+7FjihehotqE 09aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=DizW2Ub2HnKsGQT9oGHPExadbw7iiphUBTY5IPGaE18=; b=DlgzkMm4W06NR104/eoG10zH2rNs7DusO98sED+TVP6cCeNOBqYajV2Lky98Ktfvse WAXyHEv6ueBX2CT+Vyxnb5/ncQxVrOdjXKaghGk/mS7SBJlQrrVkofR+TAo4EI6IueJ9 ccTmjXme6vsCPnBWlTIfwZOgcgrNP5dT/ivjI0ewLqeUcdSm3x1y9s9Pq76Ph72mS5PT yuNsxl5iGb8EooOupnqglO9zG+ge6u8R+q5LkUF1lPK/JVjwTaPt2Aj4JlXM0ETX7hUG P+2rT9YMoXzWIC91JUfGh6do/GI81/9+qu2rWuYSHA+O7czeBInT0AhZ47/np0D7t143 YMmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd17-20020a1709069b9100b00730a136d52esi11619288ejc.693.2022.08.15.21.30.29; Mon, 15 Aug 2022 21:31:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229726AbiHPE1m (ORCPT + 99 others); Tue, 16 Aug 2022 00:27:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229744AbiHPE11 (ORCPT ); Tue, 16 Aug 2022 00:27:27 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5964B1A6CD6; Mon, 15 Aug 2022 18:06:10 -0700 (PDT) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4M6Cb15V6RzmVpd; Tue, 16 Aug 2022 09:03:57 +0800 (CST) Received: from kwepemm600010.china.huawei.com (7.193.23.86) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 16 Aug 2022 09:06:08 +0800 Received: from [10.174.178.31] (10.174.178.31) by kwepemm600010.china.huawei.com (7.193.23.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 16 Aug 2022 09:06:07 +0800 Subject: Re: [PATCH] NFS: Fix missing unlock in nfs_unlink() To: , CC: , , References: <20220812011440.3602849-1-sunke32@huawei.com> From: Sun Ke Message-ID: <5e947976-0808-1d32-e170-d85ef73972e7@huawei.com> Date: Tue, 16 Aug 2022 09:06:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <20220812011440.3602849-1-sunke32@huawei.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.178.31] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600010.china.huawei.com (7.193.23.86) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org friendly ping... ?? 2022/8/12 9:14, Sun Ke ะด??: > Add the missing unlock before goto. > > Fixes: 3c59366c207e ("NFS: don't unhash dentry during unlink/rename") > Signed-off-by: Sun Ke > --- > fs/nfs/dir.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c > index dbab3caa15ed..1b879584d4fe 100644 > --- a/fs/nfs/dir.c > +++ b/fs/nfs/dir.c > @@ -2484,8 +2484,10 @@ int nfs_unlink(struct inode *dir, struct dentry *dentry) > */ > error = -ETXTBSY; > if (WARN_ON(dentry->d_flags & DCACHE_NFSFS_RENAMED) || > - WARN_ON(dentry->d_fsdata == NFS_FSDATA_BLOCKED)) > + WARN_ON(dentry->d_fsdata == NFS_FSDATA_BLOCKED)) { > + spin_unlock(&dentry->d_lock); > goto out; > + } > if (dentry->d_fsdata) > /* old devname */ > kfree(dentry->d_fsdata); >