From patchwork Wed Sep 24 13:11:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olga Kornievskaia X-Patchwork-Id: 4965391 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 071879F3DF for ; Wed, 24 Sep 2014 13:11:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A7AE2020E for ; Wed, 24 Sep 2014 13:11:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DD843201DD for ; Wed, 24 Sep 2014 13:11:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751201AbaIXNLG (ORCPT ); Wed, 24 Sep 2014 09:11:06 -0400 Received: from mail-ie0-f182.google.com ([209.85.223.182]:35369 "EHLO mail-ie0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751012AbaIXNLG (ORCPT ); Wed, 24 Sep 2014 09:11:06 -0400 Received: by mail-ie0-f182.google.com with SMTP id tp5so6171354ieb.27 for ; Wed, 24 Sep 2014 06:11:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=wdexr3Ipf6PxlTHpAAk/0F9gnHV4iSfxFaL0bfg+3ns=; b=r9QOj54dc1lPznU3jC/0WMbqw4KFezv4nT/uNj19hXa+v1iwrULay7hf6vVSAbh/4T Nik37bzGdEL8P++65bvxVTkV8S/7TYHOERFJMfeBzlEWDNixLuoQENwetzpA8fZ86FDy ZJl3rCCl3RiFvjpdoIQd9HFdq0e7ONfqFQiuvWKrMrS0/64s5Mwk5iYiCASluVYPpuQ6 Zh9uclVyDfKUmq4igNlxo1WLEVfRitixV24Q2vKzRbRa6+JCXxU5GpVaR2hzKAYrW1st w9Rs+mAlY6T/Vg6DLwELMqkZNkv4AgOaKI9in0paFu5Ygc0vPC6vHqB1F9iZWbY9vXG3 3rzQ== MIME-Version: 1.0 X-Received: by 10.42.199.11 with SMTP id eq11mr10942233icb.5.1411564264691; Wed, 24 Sep 2014 06:11:04 -0700 (PDT) Received: by 10.107.158.211 with HTTP; Wed, 24 Sep 2014 06:11:04 -0700 (PDT) Date: Wed, 24 Sep 2014 09:11:04 -0400 X-Google-Sender-Auth: w5gRiPLjRkB6GY9l573C0QVWwCY Message-ID: Subject: [PATCH 1/1] Fixing lease renewal From: Olga Kornievskaia To: linux-nfs Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit c9fdeb28 removed a 'continue' after checking if the lease needs to be renewed. However, if client hasn't moved, the code falls down to starting reboot recovery erroneously (ie., sends open reclaim and gets back stale_clientid error) before recovering from getting stale_clientid on the renew operation. Signed-off-by: Olga Kornievskaia --- fs/nfs/nfs4state.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 22fe351..4616598 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -2340,11 +2340,13 @@ static void nfs4_state_manager(struct nfs_client *clp) continue; } - if (test_and_clear_bit(NFS4CLNT_CHECK_LEASE, &clp->cl_state)) { + if (!test_bit(NFS4CLNT_MOVED, &clp->cl_state) && + test_and_clear_bit(NFS4CLNT_CHECK_LEASE, &clp->cl_state)) { section = "check lease"; status = nfs4_check_lease(clp); if (status < 0) goto out_error; + continue; } if (test_and_clear_bit(NFS4CLNT_MOVED, &clp->cl_state)) {