From patchwork Thu Dec 1 22:07:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 9457133 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C7BE260515 for ; Thu, 1 Dec 2016 22:07:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B99AF284A2 for ; Thu, 1 Dec 2016 22:07:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AE6C928540; Thu, 1 Dec 2016 22:07:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F2AA284A2 for ; Thu, 1 Dec 2016 22:07:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751676AbcLAWH4 (ORCPT ); Thu, 1 Dec 2016 17:07:56 -0500 Received: from mail-io0-f195.google.com ([209.85.223.195]:32999 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750847AbcLAWHz (ORCPT ); Thu, 1 Dec 2016 17:07:55 -0500 Received: by mail-io0-f195.google.com with SMTP id j92so3875933ioi.0 for ; Thu, 01 Dec 2016 14:07:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=pv1auhuRjy60M4aCdU4q+gQdPpVDOp3+TqdjpH3/8yw=; b=G05EX9SkJMkZZnEeeTdg7pfYXd84+oAyXgtedz3okMuDEM8Lh/KWb9v+OrcGZNxQRo V/xxoGXKDFNEB/5FUwvoh5leZ3tj2/u7drVDwIovfEz/vyVHTTMc48nS/2QcHBv6SCa5 +iMQFZwr7qORB8G9B1HvbsFw9goVsESOcgPSo3WtyoD7xz4vH+AzOmCG7138iCOrPw7B cdQg8yaWkgTlf08+J0LB6CMqOSy1lH4kC+POocjozxB4Lr0934VVVt55tqVkHLHdlBYe ARSlkQjdCmHNt/iPm6vH0ub6jREU88vYnvuy16FUf0y/FRfiP4aNlOFryPFgxAYs4Zpq WCkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=pv1auhuRjy60M4aCdU4q+gQdPpVDOp3+TqdjpH3/8yw=; b=RNVa5w3MV4Fhb8Rq9l3SC+2rRwvaaR2AIIklp5h1JLVlTHDtlJRehgAEXgTG2mEV+F Ebs1LK9zD+8K2ak20yGfCu9pDSh+0zGN8I7L3wMjQBmp/kNCgCDfLXggkFNpPrdL43K2 Cc9dLql2w3aqpMCCEQr9X5fCSbBTQwilUY8ZVX9FePqvpT32KS7P8XEW0RZZNFSsAMQR L9mtzL3TpPRzy+EUBd/3J5lTBBVnbFLg35sux0Thi6PnbPC0w45XcEqi6bXePZ10msLV APwsAT39UJ8SFyEX7IqwrjT3QObwHInkuy+9T33cgdNDn7pjJzOeO/+emMQhPpFJ4GqN mkTA== X-Gm-Message-State: AKaTC007s+ks/uHP5ScExCvKjxzqdKq+ACr6uK6U8KOaN8ZO2uJQO6RbtOaxNFOQpZICQQ== X-Received: by 10.36.175.82 with SMTP id l18mr35271429iti.113.1480630075121; Thu, 01 Dec 2016 14:07:55 -0800 (PST) Received: from leira.trondhjem.org.localdomain (c-68-49-162-121.hsd1.mi.comcast.net. [68.49.162.121]) by smtp.gmail.com with ESMTPSA id e35sm941293iod.32.2016.12.01.14.07.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Dec 2016 14:07:54 -0800 (PST) From: Trond Myklebust To: linux-nfs@vger.kernel.org Cc: Fred Isaman Subject: [PATCH] NFSv4.1: Fix regression in callback retry handling Date: Thu, 1 Dec 2016 17:07:53 -0500 Message-Id: <20161201220753.12854-1-trond.myklebust@primarydata.com> X-Mailer: git-send-email 2.9.3 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fred Isaman When initializing a freshly created slot for the calllback channel, the seq_nr needs to be 0, not 1. Otherwise validate_seqid and nfs4_slot_wait_on_seqid get confused and believe that the mpty slot corresponds to a previously sent reply. Signed-off-by: Fred Isaman Signed-off-by: Trond Myklebust --- fs/nfs/nfs4session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/nfs4session.c b/fs/nfs/nfs4session.c index a61350f75c74..769b85655c4b 100644 --- a/fs/nfs/nfs4session.c +++ b/fs/nfs/nfs4session.c @@ -169,7 +169,7 @@ bool nfs4_try_to_lock_slot(struct nfs4_slot_table *tbl, struct nfs4_slot *slot) struct nfs4_slot *nfs4_lookup_slot(struct nfs4_slot_table *tbl, u32 slotid) { if (slotid <= tbl->max_slotid) - return nfs4_find_or_create_slot(tbl, slotid, 1, GFP_NOWAIT); + return nfs4_find_or_create_slot(tbl, slotid, 0, GFP_NOWAIT); return ERR_PTR(-E2BIG); }