Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp304043pxj; Thu, 20 May 2021 09:41:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7yLXkDZG+V/TvM6C3tGrpuby4APW5pQTkMPwyzElbTpsbzpWWSKwq2uW831Ovb/GbsNs6 X-Received: by 2002:a05:6402:749:: with SMTP id p9mr6050596edy.149.1621528885184; Thu, 20 May 2021 09:41:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621528885; cv=none; d=google.com; s=arc-20160816; b=MhyNd9ssOdEYfc48gJhjuo/TJLFOb1CyuUlupG20fk/2Mf8bCpguF/xWZ6qivMhIQw 5cPpY4+n72/0B/bH3OzQlMfIKKYZYArFu/cJXkckh5AprA/WHYLHYROa3hFjiRo51cLg 5vGd1nXVJCusyGQJ/rY+z2xesXuMzUOpTdz2WIGLOXFqclagNViQ0wNew/+AkYEiUg0V 4N7YW0QqUpX8fcaWFJHwwnKJkxAyNvFKs1/NjHLbjQBdv5nHM/zjzFrtPTu9y+AzIFWv zRyxi3SXyPam+mKFbslT8vWlMhbVqHLylWBO1/67aw06Rgwx//sqK7kamOTKTCSGEhO3 5hTA== 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=o+2Bhpi0YmR1CCiYqUnLVngUImqWQqHuluTu7eXZTWk=; b=VIcWRjC3rIdeNA/KdnvHVpFQJAr2rjxAs1Jtwbsn47W+FrXXwl9vAHfPOwpo9CrdWM ghKgTNh0FOAUfkgU/raeiu8gSJm9y4z+oOpXt2XNPgVXWvmGlwzP3T8SEMrW8m1g/bex 08ykpN9qoML8s9nw0FiERHfre7a6hig6uHhl0izBFxoDN53hjAYXQSAsvWl7wFi2p1F9 rPiWGuXsojwjINSC0rsgjdi16i2p8Qu6OQd1wWi2mkGlITQSzWyg3laENUv0A+zlDM2b TaluLTuqojF+Um2kL0t579fXdC2a3FRmduRu8xk1jTl3km1fO6ZztRTLqZ4Rsa7Sbhmv 7dNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ngIEdqFI; 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 zg9si3364778ejb.426.2021.05.20.09.41.01; Thu, 20 May 2021 09:41:25 -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=ngIEdqFI; 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 S233467AbhETJpc (ORCPT + 99 others); Thu, 20 May 2021 05:45:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:41380 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233099AbhETJmX (ORCPT ); Thu, 20 May 2021 05:42:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 01710613E6; Thu, 20 May 2021 09:32:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621503146; bh=qPrtqrM830SwP71pthpqXJRduOrWBDWXMnYl1rHV8T0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ngIEdqFIieiHhk6LOxFSqgRaS3dPJ0AQiwezk/206hIhjhH0VM5JHJFWS3q/ZBjY+ FAEpbM9Q3Plga41YhuWmwS/DpalGwLa+6CgXuiRfvmyZeSCd5C3/ZlSOr2eXN7bfwr 4CW9WFeWvNto8z4EwkYtTh+nNQAjq4tHsjxu72y8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Trond Myklebust Subject: [PATCH 4.19 089/425] NFSv4: Dont discard segments marked for return in _pnfs_return_layout() Date: Thu, 20 May 2021 11:17:38 +0200 Message-Id: <20210520092134.372020207@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092131.308959589@linuxfoundation.org> References: <20210520092131.308959589@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 @@ -1294,7 +1294,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 = {