Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1348422pxf; Fri, 19 Mar 2021 05:24:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbg7o2Elxql9a4lS98qMQlnuHCvQbRpG+vSvR91DfIDDiY2YRQmNt/XuhUsY7v7H0wH3DR X-Received: by 2002:a17:906:5e50:: with SMTP id b16mr4144041eju.272.1616156675263; Fri, 19 Mar 2021 05:24:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616156675; cv=none; d=google.com; s=arc-20160816; b=ZmM1uf97MCiCsG9owFy+Iyj7y3XsYNIa/sr1gBOphPSvfbso1sGMaiVA/zXTuBQIBr 41zdVfNAgivyP+oiWAMUmASevh10bvRSZ4VXTorYYDO+o24lxC2MgOdwB2F8O3RTXyqR IbuClgHfrfQsJ6ZxdDiE/wr1pyMgpRCSGBOuH34MeRqNxGT1FhZNc9qJwZCiXphmZznV eFO+Ezgswv5BRSlYYGK0IKETcOa3pAtG3rvPsrNxky1R3VnIpiktUliOT5F8EpNIefFN +8pAKRrPNc96FW2O5+c425Y1oX1uO88xP11qahG0Cn2NB9YvdE33dBeaRQYxpjSrKCU1 XxSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BBDEdXfASr1obD9Pnnukt3KQMufBq0ZANVt28+F3RjQ=; b=0EUjAEQuw0fTG3fhcAMW2tH6v0xAu4bs7Sei2gwoQB94d8DR0ODYI1V804CW+/ZCBl AXoVMiCYZqWOu+qg2PvKGtnHi2VCICVTJ3AxVWSii6IIoZ2KEHupxPpYM9acJezpCJM+ CyGDzcj4qSDQfichLcekaavrKxNfg8rbDLxI871Q+3Qz0bsUDWA0ZnDuVqulZ3jgv/ko SNlumMHS8INn0FnynNtEckVMkr9qd3WnAqHWP8tGPPcmsTgcedQ3tRidOLZKJWrALkWR eL3YQ+sGGIe5HnftcA0Q+HiTSUYh2GgeyvXiGjc2lLF9AxF+6VeH5t1X6Dko7Nf+iNRB Nz4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xgpcLUnI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d26si4020737edz.20.2021.03.19.05.24.13; Fri, 19 Mar 2021 05:24:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xgpcLUnI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230468AbhCSMUY (ORCPT + 99 others); Fri, 19 Mar 2021 08:20:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:57710 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230356AbhCSMTz (ORCPT ); Fri, 19 Mar 2021 08:19:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AB5AC64E6B; Fri, 19 Mar 2021 12:19:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1616156395; bh=X1wwdFM5WtvcEG+7IaS7I6fTZxYiQTN2BDMJV391pzM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xgpcLUnIyOh19mHngPsATM+Yv//UfUxttuhJSptMaFbUjScBiD9bGupBVklV429SK wXfJOtNPOFutXIvGcAR/k7155GAL+ldS9ns1ltNPhvfxgLeVbenMDFGTsNxZQSG5tL KXkpHYzEzY63CjelLGFmxN7m156jQN44Of4957x4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "J. Bruce Fields" , Chuck Lever Subject: [PATCH 5.10 10/13] Revert "nfsd4: remove check_conflicting_opens warning" Date: Fri, 19 Mar 2021 13:19:07 +0100 Message-Id: <20210319121745.440078590@linuxfoundation.org> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210319121745.112612545@linuxfoundation.org> References: <20210319121745.112612545@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: J. Bruce Fields commit 4aa5e002034f0701c3335379fd6c22d7f3338cce upstream. This reverts commit 50747dd5e47b "nfsd4: remove check_conflicting_opens warning", as a prerequisite for reverting 94415b06eb8a, which has a serious bug. Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields Signed-off-by: Chuck Lever Signed-off-by: Greg Kroah-Hartman --- fs/nfsd/nfs4state.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -4957,6 +4957,7 @@ static int nfsd4_check_conflicting_opens writes--; if (fp->fi_fds[O_RDWR]) writes--; + WARN_ON_ONCE(writes < 0); if (writes > 0) return -EAGAIN; spin_lock(&fp->fi_lock);