Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp677483ybv; Thu, 13 Feb 2020 07:36:54 -0800 (PST) X-Google-Smtp-Source: APXvYqyokHQx3payEeWlBYDDqLF7miuDTSPi9c/ei4N8UEB9apfKoHXN/RIby+6UBMTBEzc9SG49 X-Received: by 2002:aca:318f:: with SMTP id x137mr3417670oix.100.1581608214597; Thu, 13 Feb 2020 07:36:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581608214; cv=none; d=google.com; s=arc-20160816; b=O9nv5XtZdQaoeLwtLkaVXtY/bZSpfIvzsmTr/DodNcHlku+ihIq1qmnnlksdwJ+Pd6 rWH0DywCZvbiOXg7eFJpm4j2vmXsT24sE9GUl4I3n4a3DtpFSxTs/gbijBDPtUpKSRF8 7vh/jyoLB8ZtjnywBvBNjJS2lyT1NJwF33yJciGRddgjex+FyP52VwKTQH4dyBtrxZ2c j9URknPUYXIPxKbNzLV0f0obfzJiHOMp5S2+FvMEI+TlCVFSvysnGkfVSFbLqtt/dYd3 wdCJiNPJewrKzkgzxAo97WwhvS/ZjpQhUR47YdpFjVCUoRcx+FDCBhBol6qhquKwcFZt z15w== 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=hSZCuFrMJg4A3/FxjwqJ8ftmXxh70hXGjIZdsXhy/r8=; b=A1a8X9tVoOU0Kc9ghsGxP/M4UKdosmvvQYojbLgec1pM//NJrjIDbHN2iAhf0H9lNf h7SjFoQv2NjtfiTSnYR29fK2xly2OuNZC3EK46x8gIaRBzED1BzIv69lafXdRNdQJIdm J6iyPZqm94Z4unnL+OH8dNW6ipuQ1L5zaLCUnDbY+5ZMh/VELGuvTXO2vQxZfB8S49zP SpIx4J/csBPk0Lkjv67FIWtyWKjjF/6+Kw0iYu46+CEjkunVov53VgTJqE1LnmjcoT5U DBWNM8gcqS59UA6uJKA58vdjTBVxz/7qafSXLU/ATFrVVLCmj4t3o0DlpH2RM57PBD+B Cxsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1PdQKhQK; 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 l14si1291641otk.225.2020.02.13.07.36.41; Thu, 13 Feb 2020 07:36:54 -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=1PdQKhQK; 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 S2387824AbgBMPaS (ORCPT + 99 others); Thu, 13 Feb 2020 10:30:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:49298 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728464AbgBMP1M (ORCPT ); Thu, 13 Feb 2020 10:27:12 -0500 Received: from localhost (unknown [104.132.1.104]) (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 7B5EF2465D; Thu, 13 Feb 2020 15:27:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581607631; bh=5kwNS4XKm3AZXsdFsl8F+9R4Dv3SzGpFpihSZp9kgfE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1PdQKhQKYTtJQG++pb8OYIIxxSB98dLD3yJR0vS9/oWHO4cUfHW6Nfh1GqauAG4xH O28K0BDaBZ2BeWNNrwFpc3hjzaRFqj7Z1NdfK05zfBJnKKDgt2PQgWMGg+o6GHaUsJ DrZvtGJPf/ZRoB1pN0h1d8pvXc+DiAgWUfce8QWI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Robert Milkowski , Trond Myklebust , Anna Schumaker Subject: [PATCH 5.4 32/96] NFSv4: try lease recovery on NFS4ERR_EXPIRED Date: Thu, 13 Feb 2020 07:20:39 -0800 Message-Id: <20200213151851.414866295@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200213151839.156309910@linuxfoundation.org> References: <20200213151839.156309910@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: Robert Milkowski commit 924491f2e476f7234d722b24171a4daff61bbe13 upstream. Currently, if an nfs server returns NFS4ERR_EXPIRED to open(), we return EIO to applications without even trying to recover. Fixes: 272289a3df72 ("NFSv4: nfs4_do_handle_exception() handle revoke/expiry of a single stateid") Signed-off-by: Robert Milkowski Reviewed-by: Trond Myklebust Signed-off-by: Anna Schumaker Signed-off-by: Greg Kroah-Hartman --- fs/nfs/nfs4proc.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -3187,6 +3187,11 @@ static struct nfs4_state *nfs4_do_open(s exception.retry = 1; continue; } + if (status == -NFS4ERR_EXPIRED) { + nfs4_schedule_lease_recovery(server->nfs_client); + exception.retry = 1; + continue; + } if (status == -EAGAIN) { /* We must have found a delegation */ exception.retry = 1;