From patchwork Mon Jul 13 09:32:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kinglong Mee X-Patchwork-Id: 6776951 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 97077C05AC for ; Mon, 13 Jul 2015 09:32:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C4A1E204AE for ; Mon, 13 Jul 2015 09:32:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DD72720547 for ; Mon, 13 Jul 2015 09:32:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751487AbbGMJcj (ORCPT ); Mon, 13 Jul 2015 05:32:39 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:32852 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750919AbbGMJci (ORCPT ); Mon, 13 Jul 2015 05:32:38 -0400 Received: by pdbqm3 with SMTP id qm3so77462209pdb.0 for ; Mon, 13 Jul 2015 02:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=TWUBGUUj7GAmIoD87R3oA6YrAC5Is0J7vK0vZ1MPSMc=; b=G6ZFu3HK+JpqalQOLmno0pQlepLLyHJvw5FZrAco3vH/+lyqRcOhojGzVC3BZb0Med dFaBTScUYnhsWsnl6ya4wR1koVpXSeykuw+u9HAyUW5tMxUjrQ6NKGLZthGfnPDd61qJ ey8rHgDA717IBiScg/tquKdEv4FNuwgJxsnTS2cqP0cY9hmtFtLVjm7ASVd5/RxkBYD6 M6JS64x6EWwNe+C2SCG9q6FkgcDF31ZgTW/Z39teqLsqFd8JIgeljKH70PBnqMO4j7kI EhAzr/BxVm6KVp3xmfvr5DgoWUaUya3ruFAuLwiJU2FBgEdw8SA76U7pc8idILPG27xQ PbQA== X-Received: by 10.68.76.67 with SMTP id i3mr29034169pbw.19.1436779958134; Mon, 13 Jul 2015 02:32:38 -0700 (PDT) Received: from [192.168.99.19] ([104.143.41.79]) by smtp.googlemail.com with ESMTPSA id yr9sm18226997pab.26.2015.07.13.02.32.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Jul 2015 02:32:37 -0700 (PDT) Message-ID: <55A385B2.1040409@gmail.com> Date: Mon, 13 Jul 2015 17:32:34 +0800 From: Kinglong Mee User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "J. Bruce Fields" , "linux-nfs@vger.kernel.org" CC: kinglongmee@gmail.com Subject: [PATCH 08/14] nfsd: Drop duplicate checking of seqid in nfsd4_create_session() References: <55A384B1.8030207@gmail.com> In-Reply-To: <55A384B1.8030207@gmail.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 Signed-off-by: Kinglong Mee --- fs/nfsd/nfs4state.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 2edfedc..c94d1ef 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -2548,11 +2548,9 @@ nfsd4_create_session(struct svc_rqst *rqstp, goto out_free_conn; cs_slot = &conf->cl_cs_slot; status = check_slot_seqid(cr_ses->seqid, cs_slot->sl_seqid, 0); - if (status == nfserr_replay_cache) { - status = nfsd4_replay_create_session(cr_ses, cs_slot); - goto out_free_conn; - } else if (cr_ses->seqid != cs_slot->sl_seqid + 1) { - status = nfserr_seq_misordered; + if (status) { + if (status == nfserr_replay_cache) + status = nfsd4_replay_create_session(cr_ses, cs_slot); goto out_free_conn; } } else if (unconf) {