NFSD: make cache_detail structures const

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>
This commit is contained in:
Bhumika Goyal 2017-10-17 18:14:25 +02:00 коммит произвёл J. Bruce Fields
Родитель d34971a65b
Коммит ae2e408ec2
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -232,7 +232,7 @@ static struct cache_head *expkey_alloc(void)
return NULL; return NULL;
} }
static struct cache_detail svc_expkey_cache_template = { static const struct cache_detail svc_expkey_cache_template = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.hash_size = EXPKEY_HASHMAX, .hash_size = EXPKEY_HASHMAX,
.name = "nfsd.fh", .name = "nfsd.fh",
@ -748,7 +748,7 @@ static struct cache_head *svc_export_alloc(void)
return NULL; return NULL;
} }
static struct cache_detail svc_export_cache_template = { static const struct cache_detail svc_export_cache_template = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.hash_size = EXPORT_HASHMAX, .hash_size = EXPORT_HASHMAX,
.name = "nfsd.export", .name = "nfsd.export",

Просмотреть файл

@ -178,7 +178,7 @@ static struct ent *idtoname_lookup(struct cache_detail *, struct ent *);
static struct ent *idtoname_update(struct cache_detail *, struct ent *, static struct ent *idtoname_update(struct cache_detail *, struct ent *,
struct ent *); struct ent *);
static struct cache_detail idtoname_cache_template = { static const struct cache_detail idtoname_cache_template = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.hash_size = ENT_HASHMAX, .hash_size = ENT_HASHMAX,
.name = "nfs4.idtoname", .name = "nfs4.idtoname",
@ -341,7 +341,7 @@ static struct ent *nametoid_update(struct cache_detail *, struct ent *,
struct ent *); struct ent *);
static int nametoid_parse(struct cache_detail *, char *, int); static int nametoid_parse(struct cache_detail *, char *, int);
static struct cache_detail nametoid_cache_template = { static const struct cache_detail nametoid_cache_template = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.hash_size = ENT_HASHMAX, .hash_size = ENT_HASHMAX,
.name = "nfs4.nametoid", .name = "nfs4.nametoid",