Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp2108373lkv; Thu, 20 May 2021 03:36:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8ERQEFJhd+fFOJ7Ry32WPD4kvupn19pkNgVFRJBXoOmvWXxJX3TGA+WcnS6+64Ges2g92 X-Received: by 2002:a6b:f21a:: with SMTP id q26mr4364472ioh.152.1621506987889; Thu, 20 May 2021 03:36:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621506987; cv=none; d=google.com; s=arc-20160816; b=f3Xm1i17pD+7kMSU1XwpojuMADvRp/sPOYN4qJSK3FUm/EkSXfoEI4QUEh93HhnRvI rEM270c8CSD+rXWBQLc/s+KFa11tXzzBsa9lpo+6wv1HNlmvBoYKGXHKL5qHCRBOwx/W RbJCQDdPJZN4iIH3AldzzDm0O5G68JX2+nbS8clETrQiELQOIhPOZ9VKkfG2oj5BaWml ef1M+z2jNASmVCACwh+pqF/SjaEoLMcoV4VtLSvrbYuRRtWU8dnRVpuP2nTWR47vcczK d5BwLjWCpxGOUil6t3jDo0YtLW/zKnIQxG4M89tmt6OlY03pghEsYo7PMoW3TZvZP18P msxA== 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=CuRe73YWNok051cJDsLAVDLMM+SW3r6j9BaAOwZBNfM=; b=HvpQC4RJsAcKTHU9gRHxgIKSBGwTts/PsJnyTpA5KHiw+Xtlakc94ZQgHJeH6NAttr vhnyunXtArPZzMRWiw8oJarIgHXsQ6lZXowZc+8FNmIQa7lVyC53ZpCskguyM2fyr8sG sM2LKmP1IK/R7qtMdu6ytE7veOA5BfaEoKj7r+s2ftbRRl06p7rv3UX+kJEbICY93Wqt Xvv6IW1/g8LKnncZduf/i4yaBlfB6WloSFkkQiLnfGDtA+N7ca+ipfdC54GH4FyQliY8 BnsBb0f/7C6TRKnmW1uk29nL+bdOhjonyaNjc3XriwdEnKGPtPg8BhMCqdllIr9Cuu0U GkrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ONgKXM1P; 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 q3si2781365ilu.88.2021.05.20.03.35.52; Thu, 20 May 2021 03:36: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=ONgKXM1P; 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 S237582AbhETKe5 (ORCPT + 99 others); Thu, 20 May 2021 06:34:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:51994 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235489AbhETKVa (ORCPT ); Thu, 20 May 2021 06:21:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C6123619C8; Thu, 20 May 2021 09:47:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621504074; bh=ud6+I5gVjXS5PgD/VSd2Ezox5IJqBQGFD1rwLH9osl4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ONgKXM1PJE0s1S+UNN/HVElCUQo69o6u2/Y2wSifu8+zQZjO/wNVMSykVA4mjZpZ+ LO1M08vy+/ED0TbAS2gU48FWoXctZe7jluSWhu4GWwcE03t9UokX76UQ/4hl+mB0jq NL+FpyyJerSqIs9LKWI6pVcQa1aIkMVoc6FUcxk4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Trond Myklebust Subject: [PATCH 4.14 080/323] NFSv4: Dont discard segments marked for return in _pnfs_return_layout() Date: Thu, 20 May 2021 11:19:32 +0200 Message-Id: <20210520092122.834264538@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092120.115153432@linuxfoundation.org> References: <20210520092120.115153432@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 @@ -1162,7 +1162,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 = {