nfsd: constify reply_cache_stats_operations structure
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 28 Aug 2016 20:36:55 +0000 (22:36 +0200)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 14 Nov 2016 20:24:19 +0000 (15:24 -0500)
reply_cache_stats_operations, of type struct file_operations, is never
modified, so declare it 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>
fs/nfsd/nfsctl.c

index 36b2af931e06d1d1a7c3dc613747a58433350811..be13063bcd668aeec5f9500b5d89bac93c14cfb4 100644 (file)
@@ -217,7 +217,7 @@ static const struct file_operations pool_stats_operations = {
        .release        = nfsd_pool_stats_release,
 };
 
-static struct file_operations reply_cache_stats_operations = {
+static const struct file_operations reply_cache_stats_operations = {
        .open           = nfsd_reply_cache_stats_open,
        .read           = seq_read,
        .llseek         = seq_lseek,