Re: [PATCH] nfsd: constify reply_cache_stats_operations structure

From: Jeff Layton
Date: Mon Aug 29 2016 - 06:58:02 EST


On Sun, 2016-08-28 at 22:36 +0200, Julia Lawall wrote:
> 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@xxxxxxx>
>
> ---
> Âfs/nfsd/nfsctl.c |ÂÂÂÂ2 +-
> Â1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
> index 65ad016..3bc9693 100644
> --- a/fs/nfsd/nfsctl.c
> +++ b/fs/nfsd/nfsctl.c
> @@ -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,
>

I'm pretty sure Bruce will pick this up for v4.9:

Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxxxxxxx>