sunrpc: remove dead codes of cr_magic in rpc_cred
authorKinglong Mee <kinglongmee@gmail.com>
Tue, 7 Feb 2017 13:48:49 +0000 (21:48 +0800)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 8 Feb 2017 22:02:46 +0000 (17:02 -0500)
Don't found any place using the cr_magic.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
include/linux/sunrpc/auth.h
net/sunrpc/auth.c
net/sunrpc/auth_null.c

index 39c85fb1f0edcba1474168496c14636eb80b2f91..8fd3504946ad5abbac6e502ea1b3f4ee0e439f48 100644 (file)
@@ -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 */
 
index 8b344d0eb6ed3482b2872fbcfcf145ab58f94962..a1ee933e3029b32f46e4352e1499ba6bdf22818a 100644 (file)
@@ -648,9 +648,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);
index 4d17376b2acb118fc1f17f2981f22eea676e3667..5f3d527dff65c0d9cf354d0d2488b955bd1452e1 100644 (file)
@@ -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
 };