Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1349025pxf; Fri, 19 Mar 2021 05:25:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbimEjIoR6ufzg5w92FOFjWSPCYUQvcvJTsNDMNvgqNMrTMeNvIwtMxpGwHxsbjjAAXYam X-Received: by 2002:aa7:c94b:: with SMTP id h11mr9084686edt.160.1616156727746; Fri, 19 Mar 2021 05:25:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616156727; cv=none; d=google.com; s=arc-20160816; b=WdthFc7a8a+UbZ1PH1RhfCPsU1uePgPoHasMqeo6Pk474MKYOVasXrdN0NsZqyuOTV gRaVwBL5PyRMbe9AUV9OQnfJqzXsz46mphYzb4XbN8GsmegZSZ4nKutrV8Uj9BORJwB7 IGK2/LEb7Mtj4nqIcmToUx18scpsS5cjwUYhb5thQdMVgH4PpNA+w3UGsDuc1Q0akIhh ks/1+uiu+LsCHO7VdUvbTGBwadpiJX78svksopltL5RusMLjUiGao3LTfQwoV/aWrfc/ gEgaR5T2EReOcXyLUPdx+oIa1XCs1gcuH4YWka4BaEmncspfWqKhLtooB3ykVKFenkxo iK7w== 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=cSXYeJ1MqSLBdHKNibSnog7MZvw9U+wgAEmi3/lAi2j/+jdTSzlqEPrx6D6yQiwmoy lkeWXQBA12SdZi3/7v3nJY1TsDOrcppmzYBS6mFjZvdQFsD3ldGJDNO1/kXPYqzK6MB/ 6//cHW0yQDVll49ykoKrzEtgK2GrscI07M0MwOH1tRCgsH6LO77zUCqr92oscTCNScOz 1O7UimPqFJ/lM4gZm+YQoWTO+UA1ECyopQGRH3M4uez4XsIumjX+1IJA+WrE4TZ9gA0Z Q0JDc5++D9i4KUcjaa7/BstMiDST6oV9SzLQwOp6GIA70Z1PINnAKlZ+qjHasbxEGhV7 RiCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rFryo5Tr; 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 e19si4439513edj.230.2021.03.19.05.25.05; Fri, 19 Mar 2021 05:25:27 -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=rFryo5Tr; 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 S231639AbhCSMVq (ORCPT + 99 others); Fri, 19 Mar 2021 08:21:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:59654 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231473AbhCSMVO (ORCPT ); Fri, 19 Mar 2021 08:21:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 39F8064E6B; Fri, 19 Mar 2021 12:21:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1616156473; bh=X1wwdFM5WtvcEG+7IaS7I6fTZxYiQTN2BDMJV391pzM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rFryo5Trh08f3fShx3MCE0R1lJQ/RvXT00dKXKfYBbLL7WpQm92d9kb4KyXWzNu5d 5K27kMtjFX24f2dUymyarzX8IWhzQBROd+kCZfT28YwipsFWRapjLBuIqopYG+bOTJ 3GxXo+jfCztXnBdErZe0GmwAvTemzwWw0ITp3SZA= 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.11 28/31] Revert "nfsd4: remove check_conflicting_opens warning" Date: Fri, 19 Mar 2021 13:19:22 +0100 Message-Id: <20210319121748.110813942@linuxfoundation.org> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210319121747.203523570@linuxfoundation.org> References: <20210319121747.203523570@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);