Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10435985ybi; Wed, 24 Jul 2019 23:10:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFVGM6DuhYCXVHUSC7AAsSG6AvFkNaXLSd6ib8+CULRqle7PvXn3kek6mFKF8qbHHzRlBg X-Received: by 2002:a17:902:e58b:: with SMTP id cl11mr87093484plb.24.1564035029430; Wed, 24 Jul 2019 23:10:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564035029; cv=none; d=google.com; s=arc-20160816; b=t2TrdEFbo4rQR/ZJTDNqM2iSnU9HHnx03gIU9repFl0UBB6IaQ82vj1ynJ+I9wHLQQ kyUQsqJK4r/i9z4jxW5W0j0Hv0qdPUV7FDOGBlQI5ZnYfbw5yc4DBalKkbgQSmxE+9yV Qfg76iYP1lVFeUTZpwIK5JfHGH4uumB+y4gPlPbK5PB/3vuxOtPuN0tdRViGUx2tUotx nxNq5AqhKFdHIQq5XECGJZNk8tKuhA+IRleUEFrkpW3bM8nU8Lb0xS1LponQiqqWEgAh thMwtekZ/9rM4FvBCysHasvcOXEui/iBFYpUeA/tKBU0Y+fNMEYpszVRPUwNaGMkw5H/ Ai+Q== 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=r+C6RUVkT3SxuMw/50qA2SJKyB+REUZrOSPzrTjUbh4=; b=ILrHTuVR9PAp3r2xL1+5fdVXkpO4Wtf+mWd8Ic4B7FJy5RJBv6ZFKdq6F6nIPXt1Cz c9HchsrjyA+cCjfMsp7aC57YuDbgvrB59Pba7HhQQs25itIRLCERnoFJO0U29gLf/I7W Blm4IqkPBAYRazlpvPvbNTYtxsBOgYMnQSTP6TR5fHn9IHNpkdBzCjEVQkj3Itjl05Wr yexC8iD6AzNMnkHByFPh9EFSV1ispfoWWdlSBmDrh0sdwDZJopxbS6pKxsGdXtBeN89X DNqzvmdZgpqTevXCigfhOPKWJnX7T+ojdo5RgiL3kEJfTrGf4M9biM+Wyn4Cl90T7fYY fQjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yG17frNv; 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 v62si19966253pgv.126.2019.07.24.23.10.15; Wed, 24 Jul 2019 23:10:29 -0700 (PDT) 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=yG17frNv; 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 S1728459AbfGYFty (ORCPT + 99 others); Thu, 25 Jul 2019 01:49:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:58734 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391082AbfGYFno (ORCPT ); Thu, 25 Jul 2019 01:43:44 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 9882D21850; Thu, 25 Jul 2019 05:43:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564033424; bh=sX3FSgQbZueRubhLEc2kROJOAcVqYYn40pCYrivNa7w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yG17frNvuRcvzdqd7dIC9IznAKYRe01Jm6OOh1nI0Ttt1XFS63B/cHouDRXPxVbNY 8hViWFRzH4vOfdImOE7m/2nym2y1zx3KxfQwvBazjViablMkXFMM4O/wTLbpcUCDPG tjdiXB4g+7DbzSRN1KOVxhIMb3iooXdCEJStBs2k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Trond Myklebust Subject: [PATCH 4.19 202/271] pnfs: Fix a problem where we gratuitously start doing I/O through the MDS Date: Wed, 24 Jul 2019 21:21:11 +0200 Message-Id: <20190724191712.404937925@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191655.268628197@linuxfoundation.org> References: <20190724191655.268628197@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Trond Myklebust commit 58bbeab425c6c5e318f5b6ae31d351331ddfb34b upstream. If the client has to stop in pnfs_update_layout() to wait for another layoutget to complete, it currently exits and defaults to I/O through the MDS if the layoutget was successful. Fixes: d03360aaf5cc ("pNFS: Ensure we return the error if someone kills...") Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org # v4.20+ 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 @@ -1867,7 +1867,7 @@ lookup_again: spin_unlock(&ino->i_lock); lseg = ERR_PTR(wait_var_event_killable(&lo->plh_outstanding, !atomic_read(&lo->plh_outstanding))); - if (IS_ERR(lseg) || !list_empty(&lo->plh_segs)) + if (IS_ERR(lseg)) goto out_put_layout_hdr; pnfs_put_layout_hdr(lo); goto lookup_again;