From patchwork Tue Feb 7 13:48:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kinglong Mee X-Patchwork-Id: 9560147 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 C33AD60434 for ; Tue, 7 Feb 2017 13:49:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4A1423B24 for ; Tue, 7 Feb 2017 13:49:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A70D4283CA; Tue, 7 Feb 2017 13:49:00 +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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 3C97423B24 for ; Tue, 7 Feb 2017 13:49:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753685AbdBGNs7 (ORCPT ); Tue, 7 Feb 2017 08:48:59 -0500 Received: from mail-it0-f66.google.com ([209.85.214.66]:34671 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753263AbdBGNs6 (ORCPT ); Tue, 7 Feb 2017 08:48:58 -0500 Received: by mail-it0-f66.google.com with SMTP id o185so12361690itb.1 for ; Tue, 07 Feb 2017 05:48:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=CPy/2XDrKbreoxHkeFL/BsCQrSRNp/8CPsQGBaX+pqQ=; b=FuOGJ5AVRV8SmwQUKmJS8+mVKP1FTYCshCgR3cXi28yLB+8Dlg/CVlbmaiTA8EP+N9 PUk/z/tSx4p2XNcwEC2EUzZeMk0b8fHJMSzS0cxu5jjgce29+JNiPmtcncuoki96sHb0 s4QSujlY7pglrCUdPE4dFlvPkvcZ5Izoqq2Xai7+KPxvc0lM3nvJlLPNwqVlHr4ljpXH gqLdim3izAGGjJM1EeArup8S33SnVCJ9J1ROmaA7xKGlw8IoHBXz5j4zfBFqXBuJ1pot CJktQxpkgIVJsHIlek6mpJoxhFoRJom7qQXBwhbB1uwcvFQJ/VloWO6GUW0MuNVchkuE th1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=CPy/2XDrKbreoxHkeFL/BsCQrSRNp/8CPsQGBaX+pqQ=; b=Jv+5feOPNv4kceEf6ivT1Nj0TjCIr2L7iHhKTGhx10WcuNcwq4+KQddcsxdskFVGOJ kyTd/WrGVjNkrmyIDvRKd7ELD4WikI/lKT91KoQ6DqGUNmTr7iirL1Fh7JVM17pZiyVx Fe0BrrbpYjaEfNcWLM6XNoOmy7QLV4cUFcuw70MA/Bs5X+g1im4NN1fBm7k8o6ClH5qW P1u4a9GyaY1eIzJbNs41wp3r2XxzGXX5JLTKSZwLWuR+DgwhDlXkQR1rUgQNCv+k14ca jL9voNBOjMiky4XkuCVRxcUe62ANuc7Wkr2+KI5zs56lTAW57SfFf4fElkSmIJUGUNxU ovCg== X-Gm-Message-State: AIkVDXK8BDWJQX3pMUNGwQGZi+FBZkHjrJV5OkF+KyClA+OSdUD5J5hXs/35M2Q421OAJg== X-Received: by 10.36.253.139 with SMTP id m133mr11414509ith.27.1486475337751; Tue, 07 Feb 2017 05:48:57 -0800 (PST) Received: from [192.168.0.107] ([182.139.118.29]) by smtp.gmail.com with ESMTPSA id v197sm807796ita.2.2017.02.07.05.48.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Feb 2017 05:48:57 -0800 (PST) Subject: [PATCH 4/7] sunrpc: remove dead codes of cr_magic in rpc_cred To: "J. Bruce Fields" , linux-nfs@vger.kernel.org References: <59432847-8e45-4423-c441-0c67ee645f38@gmail.com> Cc: Trond Myklebust , Kinglong Mee From: Kinglong Mee Message-ID: Date: Tue, 7 Feb 2017 21:48:49 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <59432847-8e45-4423-c441-0c67ee645f38@gmail.com> 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 Don't found any place using the cr_magic. Signed-off-by: Kinglong Mee --- include/linux/sunrpc/auth.h | 5 ----- net/sunrpc/auth.c | 3 --- net/sunrpc/auth_null.c | 3 --- 3 files changed, 11 deletions(-) diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index 39c85fb..8fd3504 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h @@ -64,9 +64,6 @@ struct rpc_cred { struct rcu_head cr_rcu; struct rpc_auth * cr_auth; const struct rpc_credops *cr_ops; -#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) - unsigned long cr_magic; /* 0x0f4aa4f0 */ -#endif unsigned long cr_expire; /* when to gc */ unsigned long cr_flags; /* various flags */ atomic_t cr_count; /* ref count */ @@ -80,8 +77,6 @@ struct rpc_cred { #define RPCAUTH_CRED_HASHED 2 #define RPCAUTH_CRED_NEGATIVE 3 -#define RPCAUTH_CRED_MAGIC 0x0f4aa4f0 - /* rpc_auth au_flags */ #define RPCAUTH_AUTH_NO_CRKEY_TIMEOUT 0x0001 /* underlying cred has no key timeout */ diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index 2bff63a..a7d03ea 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c @@ -646,9 +646,6 @@ rpcauth_init_cred(struct rpc_cred *cred, const struct auth_cred *acred, cred->cr_auth = auth; cred->cr_ops = ops; cred->cr_expire = jiffies; -#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) - cred->cr_magic = RPCAUTH_CRED_MAGIC; -#endif cred->cr_uid = acred->uid; } EXPORT_SYMBOL_GPL(rpcauth_init_cred); diff --git a/net/sunrpc/auth_null.c b/net/sunrpc/auth_null.c index 4d17376..5f3d527 100644 --- a/net/sunrpc/auth_null.c +++ b/net/sunrpc/auth_null.c @@ -139,7 +139,4 @@ struct rpc_cred null_cred = { .cr_ops = &null_credops, .cr_count = ATOMIC_INIT(1), .cr_flags = 1UL << RPCAUTH_CRED_UPTODATE, -#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) - .cr_magic = RPCAUTH_CRED_MAGIC, -#endif };