Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2491277pxj; Mon, 10 May 2021 04:23:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAlbkdITuNZAKvxFei1XjmhUDZZ60nKAvcvhroq1jW/DUWjaCSDiAwShG8h+TkpEh7a8iT X-Received: by 2002:aa7:c390:: with SMTP id k16mr25386054edq.97.1620645713990; Mon, 10 May 2021 04:21:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620645713; cv=none; d=google.com; s=arc-20160816; b=NueXAJDISPTm2nky02/jvhinsnsKpuBg98OiqjAewRSsQ0DHqzCIw0XLFI+yDSR2Jm bd0yvUA2zDo9knWVTXS+Jenif1CU30cwcM1RDFeoOvpT870tR7kz3Gt1895svLnVwPCM pGa4fza7TaCCESkJA+MGAzYIRmIzzthwjerGQORGPp84UrnW9yDO3bHFGZd75hFg98qL NMDvJCQwYX8WTg7CyiqPG0XWVlnNteoRO1z3UhPlzBM67bXjb5ECJoeaa0Y5WDVhu4RV 5szJQIIrnYF/tZOWPS1VexacnQOTSJUYj9nHXqIH/50aa015TyWTxvEluSmibZbi/BX7 w4NA== 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=u0taGL/KyaVNPBzjn+Gsv/BI+gTi8kCRfYx85yG4upQ=; b=Bon1RQ13ZKUfin+YcdVj67bO4pl44AD50auodei/kkYSG/kvtPtD0E9Y1TS0nv4paj KSCtFzys/YJsG3ZRKJi1nQ3T47RAi92fVv2ck53Isl8du4+ekzANEkPASDe7CraOYesX WBbxUBtomT43qT/6FFfXJNvAu6oZe72obCiAngtIRUXkETudXFZ2zzjRrrNqGX4SFFGb Oy9jkccHS7li5/hwmIc5/9GVUPbcaU8TLlpo/2HLika7m6m6fAEFj0nPd1ChtK+aTOxa xSA1m1q/qX6z5fOhDfEcYxz1/4T0e7/sqAOIhg5PtNHSjXLyvZMuaK8DEuToju3iAh+1 NydA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=M4VDTx8K; 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 d4si3239508ejz.692.2021.05.10.04.21.30; Mon, 10 May 2021 04:21:53 -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=M4VDTx8K; 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 S238465AbhEJLRt (ORCPT + 99 others); Mon, 10 May 2021 07:17:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:41704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233070AbhEJKyZ (ORCPT ); Mon, 10 May 2021 06:54:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A49B161926; Mon, 10 May 2021 10:41:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620643307; bh=Z3l4YmwAXxTeVKaGMy/bTcNl0d4GDdy4twdeXag1rbg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M4VDTx8KIh2L59Y4lGVzRRuVbjqcxOcJWkorPRqvYY65qycxBmK6pmGGVtHSOOof/ k9bpR2o1LGR9cdfje7dSkD6bu9mKHdNKY4BL3pRx0g2ZV1k/+aJ/2skFkT1NSAvOsh xNXCRcLPA6ZPfpFaivDerLINUohIvXA6W6JY1ND0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Trond Myklebust Subject: [PATCH 5.10 235/299] NFSv4: Dont discard segments marked for return in _pnfs_return_layout() Date: Mon, 10 May 2021 12:20:32 +0200 Message-Id: <20210510102012.721401998@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102004.821838356@linuxfoundation.org> References: <20210510102004.821838356@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: Trond Myklebust commit de144ff4234f935bd2150108019b5d87a90a8a96 upstream. If the pNFS layout segment is marked with the NFS_LSEG_LAYOUTRETURN flag, then the assumption is that it has some reporting requirement to perform through a layoutreturn (e.g. flexfiles layout stats or error information). Fixes: 6d597e175012 ("pnfs: only tear down lsegs that precede seqid in LAYOUTRETURN args") Cc: stable@vger.kernel.org Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hartman --- fs/nfs/pnfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -1344,7 +1344,7 @@ _pnfs_return_layout(struct inode *ino) } valid_layout = pnfs_layout_is_valid(lo); pnfs_clear_layoutcommit(ino, &tmp_list); - pnfs_mark_matching_lsegs_invalid(lo, &tmp_list, NULL, 0); + pnfs_mark_matching_lsegs_return(lo, &tmp_list, NULL, 0); if (NFS_SERVER(ino)->pnfs_curr_ld->return_range) { struct pnfs_layout_range range = {