aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2015-11-22 02:22:10 -0500
committerJ. Bruce Fields <bfields@redhat.com>2015-11-23 14:15:30 -0500
commit7c582e4faaf2593116068fc9ec8f5d81f720c02b (patch)
tree82722d73508bf0da5743ffb76fea4f850e7f28e8
parent6f18dc893981e4daab29221d6a9771f3ce2dd8c5 (diff)
nfsd: recover: constify nfsd4_client_tracking_ops structures
The nfsd4_client_tracking_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: Jeff Layton <jlayton@poochiereds.net> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r--fs/nfsd/netns.h2
-rw-r--r--fs/nfsd/nfs4recover.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfsd/netns.h b/fs/nfsd/netns.h
index d8b16c2568f3..5fbf3bbd00d0 100644
--- a/fs/nfsd/netns.h
+++ b/fs/nfsd/netns.h
@@ -92,7 +92,7 @@ struct nfsd_net {
92 92
93 struct file *rec_file; 93 struct file *rec_file;
94 bool in_grace; 94 bool in_grace;
95 struct nfsd4_client_tracking_ops *client_tracking_ops; 95 const struct nfsd4_client_tracking_ops *client_tracking_ops;
96 96
97 time_t nfsd4_lease; 97 time_t nfsd4_lease;
98 time_t nfsd4_grace; 98 time_t nfsd4_grace;
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
index e3d47091b191..79f0307a5ec8 100644
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -631,7 +631,7 @@ nfsd4_check_legacy_client(struct nfs4_client *clp)
631 return -ENOENT; 631 return -ENOENT;
632} 632}
633 633
634static struct nfsd4_client_tracking_ops nfsd4_legacy_tracking_ops = { 634static const struct nfsd4_client_tracking_ops nfsd4_legacy_tracking_ops = {
635 .init = nfsd4_legacy_tracking_init, 635 .init = nfsd4_legacy_tracking_init,
636 .exit = nfsd4_legacy_tracking_exit, 636 .exit = nfsd4_legacy_tracking_exit,
637 .create = nfsd4_create_clid_dir, 637 .create = nfsd4_create_clid_dir,
@@ -1050,7 +1050,7 @@ out_err:
1050 printk(KERN_ERR "NFSD: Unable to end grace period: %d\n", ret); 1050 printk(KERN_ERR "NFSD: Unable to end grace period: %d\n", ret);
1051} 1051}
1052 1052
1053static struct nfsd4_client_tracking_ops nfsd4_cld_tracking_ops = { 1053static const struct nfsd4_client_tracking_ops nfsd4_cld_tracking_ops = {
1054 .init = nfsd4_init_cld_pipe, 1054 .init = nfsd4_init_cld_pipe,
1055 .exit = nfsd4_remove_cld_pipe, 1055 .exit = nfsd4_remove_cld_pipe,
1056 .create = nfsd4_cld_create, 1056 .create = nfsd4_cld_create,
@@ -1394,7 +1394,7 @@ nfsd4_umh_cltrack_grace_done(struct nfsd_net *nn)
1394 kfree(legacy); 1394 kfree(legacy);
1395} 1395}
1396 1396
1397static struct nfsd4_client_tracking_ops nfsd4_umh_tracking_ops = { 1397static const struct nfsd4_client_tracking_ops nfsd4_umh_tracking_ops = {
1398 .init = nfsd4_umh_cltrack_init, 1398 .init = nfsd4_umh_cltrack_init,
1399 .exit = NULL, 1399 .exit = NULL,
1400 .create = nfsd4_umh_cltrack_create, 1400 .create = nfsd4_umh_cltrack_create,