Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1990307imu; Fri, 14 Dec 2018 04:09:50 -0800 (PST) X-Google-Smtp-Source: AFSGD/VCRfdRLhuya/+capcfT1te/tGy5FZYv3UQye2WI7HeKTJAKVGzUcfB+PrnnuDjJXrTbCOH X-Received: by 2002:a63:5c22:: with SMTP id q34mr2437408pgb.417.1544789390602; Fri, 14 Dec 2018 04:09:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544789390; cv=none; d=google.com; s=arc-20160816; b=0r6W34WmSQW791mNntFSNJRIs39gk06OQR9f/qtxCgS+YEc7xSKbJc8mHUxqCyyECq PKq3Qid7/uFCNmArCC9+NL2SnTv3jxH41UDMTdSrdDYj9A7JA0Ujfv/dzOqy4KkMkB2m RT+8sS/wqH51gQrl6stULV8x91+EDjf43+GETP3txMcUjv9pN4Hz/VedJNvl7+W1QRo3 8BPDgsu74wtvOpiO+7OS26zOsNOrPYUK5pzpD1rJUj2A9vvggNHe40VY5egajst5CNY7 v7IU46Wd58qwDplFkRkjUdHcrbGPlleSdwhFdCEJ85Ua96+xUmCY7o15EzphSb62hAU7 58IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=B9mt7XNKnYpSwrT1Sg2e/JFWbI5S8nA2aiP7F0ww274=; b=StrBgk56hE5l/zSljkN5FTv8anJJrY3B0XwqsLHqqaRqKejt2xRNgwwQAIZYW6ZZG/ 0bNw1EpQ5+NtSnNpnjz7o5aBESWn731ccwk+BKUFaIJwnf4bxrvlFsbwCqOY9HmhcAl2 gQebPg7YGGyJMuSGa0XrZts2Gf3mx48Vz9EqDvYNzT4TJ0lUYVEZ5M8TMKXd2rvxgNQv iltH2uUvtRXGcFF6hwEj4ZlHAYTKgBPok1xYZHGzhkuICYl/pQDDj4N7nWXKFW3OVCJY 7C10Po+stiChpcIN9ilTNfnFVVLMBVOkBhyv36m4DF9JnKwZk8B5Y5PjRavJkDgkMjmz 2D8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZBuEaUeI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s8si3652007pgm.508.2018.12.14.04.09.27; Fri, 14 Dec 2018 04:09:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZBuEaUeI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730967AbeLNMGl (ORCPT + 99 others); Fri, 14 Dec 2018 07:06:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:51796 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730434AbeLNMGk (ORCPT ); Fri, 14 Dec 2018 07:06:40 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ED4B5214AE; Fri, 14 Dec 2018 12:06:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544789199; bh=4pf7FxXzgRc1M0SW28xuKHBAenxdrPvyyto6ib7/rZY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZBuEaUeImj0R65Uf9H8whqHvZw/pccpWav3px5SnnjeXoxS/Wm15809IQfMgrzA5a 0hxiMNTaL0CCJgqOdeK+LKjdeyRYx6QdaXL2TS3SDsyJwhVQOWBzIpkpfqwnmDDWWx K4ARuoDXahACJsSbVV/eEFQOIljTyzUorpjF5F6E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tigran Mkrtchyan , Trond Myklebust Subject: [PATCH 4.19 133/142] flexfiles: enforce per-mirror stateid only for v4 DSes Date: Fri, 14 Dec 2018 13:00:18 +0100 Message-Id: <20181214115752.358204949@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181214115747.053633987@linuxfoundation.org> References: <20181214115747.053633987@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tigran Mkrtchyan commit 320f35b7bf8cccf1997ca3126843535e1b95e9c4 upstream. Since commit bb21ce0ad227 we always enforce per-mirror stateid. However, this makes sense only for v4+ servers. Signed-off-by: Tigran Mkrtchyan Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hartman --- fs/nfs/flexfilelayout/flexfilelayout.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c @@ -1733,7 +1733,8 @@ ff_layout_read_pagelist(struct nfs_pgio_ if (fh) hdr->args.fh = fh; - if (!nfs4_ff_layout_select_ds_stateid(lseg, idx, &hdr->args.stateid)) + if (vers == 4 && + !nfs4_ff_layout_select_ds_stateid(lseg, idx, &hdr->args.stateid)) goto out_failed; /* @@ -1798,7 +1799,8 @@ ff_layout_write_pagelist(struct nfs_pgio if (fh) hdr->args.fh = fh; - if (!nfs4_ff_layout_select_ds_stateid(lseg, idx, &hdr->args.stateid)) + if (vers == 4 && + !nfs4_ff_layout_select_ds_stateid(lseg, idx, &hdr->args.stateid)) goto out_failed; /*