Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3408150rwa; Tue, 23 Aug 2022 04:23:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR4zZS9b0QjVHv6ZcSyaaWFMV8NKBGCpSMXoyB3Nk+u8KAFZlgxzR3pNKK3N/v4+oeDJ+4yq X-Received: by 2002:a17:902:eb90:b0:172:f986:a096 with SMTP id q16-20020a170902eb9000b00172f986a096mr4862405plg.94.1661253839576; Tue, 23 Aug 2022 04:23:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661253839; cv=none; d=google.com; s=arc-20160816; b=dLLMAiXz8liny33OKz2LXUo+DwkO7s8QQUJowXyLg40AIXPuFiqn1c6J8I54gyjj2t IOmfGZG2u/S1oiGLw90iK2QucQJD4My3nEZnTAx2QZJpxGJX58Rt5MmkNQ3WUwIe83Dc JNW1B4qlJaOXPWT8Yrxirw5ckEaKKberS1ieAsmou54mVuQMmq4zYLg9sf0f9cx+mlYU +lGQbXIAPL9vMzIUe5Neufsq8gM2p4fZJK3BOeqbeD5+jXhepiL+USGLNDvrNqpF8CCL ori/zQ078n9XKUXqsTxYL8XZdsnjw3CCBuIUPah28Me/60ZvTdASF/BQb5y1ZQhWFTTW lq6A== 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=FVpFt4v/KxepKXrnRbQ19ws9zCBuikRzc0BKNdz+d3w=; b=aH+8jmiX7ktNByc3R31O9Dk1z9keIxj2wN4ClxFYlWCL70Z8YKmxf57sC+hNijlaoq w/5cmNz00LbbWL3gUUaSZUq+SDJcIzBy0hO/rrgm6euBC4bUtl6RKrx112gYZCH+oJ0D uSSDSnD4eg8pM3PWaCgz+oe4+pn8NbXg/zPHglgRS1viHrGmB/1MBDqX1/8xfvzSHQjp GMkhPs64wPGy2UtDrxKbMXPTO4YA5/cLS+eYf7s5zEiCuC8kshRW3tDxLYgI+9Tu0ic3 CP6dyR5Wf7h9FVO/M86UxPE9GuFyRHUM2NgXtq/tbGx43gY0rYijry/jMOhWA5fP/jed CnPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fGvPenTD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd10-20020a17090b4cca00b001fb395f4814si5249896pjb.180.2022.08.23.04.23.45; Tue, 23 Aug 2022 04:23:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fGvPenTD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1351887AbiHWJpi (ORCPT + 99 others); Tue, 23 Aug 2022 05:45:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352532AbiHWJlb (ORCPT ); Tue, 23 Aug 2022 05:41:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 813099925B; Tue, 23 Aug 2022 01:42:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9D3D661377; Tue, 23 Aug 2022 08:41:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8A73C433D7; Tue, 23 Aug 2022 08:41:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661244105; bh=oKIHZTWkHzIGLdnX5WRPTD0I6uOzwhp6GOfWwDzn0hs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fGvPenTDuqJdGPcwvA367QvAK4fqor6yXDLeHsOQj+65FvY2Eoc6HCMv5gJzuVFG3 C/zd74Ggio02/wsTwpd0BHdyrj5GNz3yhNBPR6l1jMsjkmXHKk5rmMg1721ziFEqQZ rmnx8nHONLZFKnBnjaGzgcVoyDhqB4BOV49Vpvbc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Trond Myklebust Subject: [PATCH 5.15 037/244] NFSv4.1: Dont decrease the value of seq_nr_highest_sent Date: Tue, 23 Aug 2022 10:23:16 +0200 Message-Id: <20220823080100.299781588@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080059.091088642@linuxfoundation.org> References: <20220823080059.091088642@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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-kernel@vger.kernel.org From: Trond Myklebust commit f07a5d2427fc113dc50c5c818eba8929bc27b8ca upstream. When we're trying to figure out what the server may or may not have seen in terms of request numbers, do not assume that requests with a larger number were missed, just because we saw a reply to a request with a smaller number. Fixes: 3453d5708b33 ("NFSv4.1: Avoid false retries when RPC calls are interrupted") Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hartman --- fs/nfs/nfs4proc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -787,10 +787,9 @@ static void nfs4_slot_sequence_record_se if ((s32)(seqnr - slot->seq_nr_highest_sent) > 0) slot->seq_nr_highest_sent = seqnr; } -static void nfs4_slot_sequence_acked(struct nfs4_slot *slot, - u32 seqnr) +static void nfs4_slot_sequence_acked(struct nfs4_slot *slot, u32 seqnr) { - slot->seq_nr_highest_sent = seqnr; + nfs4_slot_sequence_record_sent(slot, seqnr); slot->seq_nr_last_acked = seqnr; }