SUNRPC: make cache_detail structures const
authorBhumika Goyal <bhumirks@gmail.com>
Tue, 17 Oct 2017 16:14:26 +0000 (18:14 +0200)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 27 Nov 2017 21:45:11 +0000 (16:45 -0500)
Make these const as they are only getting passed to the function
cache_create_net having the argument as const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/auth_gss/svcauth_gss.c
net/sunrpc/svcauth_unix.c

index 73165e9ca5bfd2c2a928f7d1c16569cd1b59e65a..5dd4e6c9fef21f650db78907e0fa46ee09413c71 100644 (file)
@@ -264,7 +264,7 @@ out:
        return status;
 }
 
-static struct cache_detail rsi_cache_template = {
+static const struct cache_detail rsi_cache_template = {
        .owner          = THIS_MODULE,
        .hash_size      = RSI_HASHMAX,
        .name           = "auth.rpcsec.init",
@@ -524,7 +524,7 @@ out:
        return status;
 }
 
-static struct cache_detail rsc_cache_template = {
+static const struct cache_detail rsc_cache_template = {
        .owner          = THIS_MODULE,
        .hash_size      = RSC_HASHMAX,
        .name           = "auth.rpcsec.context",
index f81eaa8e08888a1a16041548521a5908bf8a9a50..740b67d5a733bdcd1ad10b6efdf957a8cd9a7889 100644 (file)
@@ -569,7 +569,7 @@ static int unix_gid_show(struct seq_file *m,
        return 0;
 }
 
-static struct cache_detail unix_gid_cache_template = {
+static const struct cache_detail unix_gid_cache_template = {
        .owner          = THIS_MODULE,
        .hash_size      = GID_HASHMAX,
        .name           = "auth.unix.gid",
@@ -862,7 +862,7 @@ struct auth_ops svcauth_unix = {
        .set_client     = svcauth_unix_set_client,
 };
 
-static struct cache_detail ip_map_cache_template = {
+static const struct cache_detail ip_map_cache_template = {
        .owner          = THIS_MODULE,
        .hash_size      = IP_HASHMAX,
        .name           = "auth.unix.ip",