diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2015-12-23 22:25:13 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2016-01-07 10:10:50 -0500 |
commit | 2a297450dd188a5d4e5e428c189b2de54f9073ba (patch) | |
tree | 0316c3948ed5bc4ae5a40a1340cec60e0b516337 | |
parent | ea44463f376236a0541288cb8d575ab6b50370d2 (diff) | |
download | linux-stable-2a297450dd188a5d4e5e428c189b2de54f9073ba.tar.gz linux-stable-2a297450dd188a5d4e5e428c189b2de54f9073ba.tar.bz2 linux-stable-2a297450dd188a5d4e5e428c189b2de54f9073ba.zip |
lockd: constify nlmsvc_binding structure
The nlmsvc_binding structure is never modified, so declare it as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r-- | fs/lockd/svc.c | 2 | ||||
-rw-r--r-- | fs/nfsd/lockd.c | 2 | ||||
-rw-r--r-- | include/linux/lockd/bind.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index b4006c720f55..154a107cd376 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -48,7 +48,7 @@ static struct svc_program nlmsvc_program; -struct nlmsvc_binding * nlmsvc_ops; +const struct nlmsvc_binding *nlmsvc_ops; EXPORT_SYMBOL_GPL(nlmsvc_ops); static DEFINE_MUTEX(nlmsvc_mutex); diff --git a/fs/nfsd/lockd.c b/fs/nfsd/lockd.c index 77e7a5cca888..1a03bc3059e8 100644 --- a/fs/nfsd/lockd.c +++ b/fs/nfsd/lockd.c @@ -58,7 +58,7 @@ nlm_fclose(struct file *filp) fput(filp); } -static struct nlmsvc_binding nfsd_nlm_ops = { +static const struct nlmsvc_binding nfsd_nlm_ops = { .fopen = nlm_fopen, /* open file for locking */ .fclose = nlm_fclose, /* close file */ }; diff --git a/include/linux/lockd/bind.h b/include/linux/lockd/bind.h index 4d24d64578c4..140edab64446 100644 --- a/include/linux/lockd/bind.h +++ b/include/linux/lockd/bind.h @@ -29,7 +29,7 @@ struct nlmsvc_binding { void (*fclose)(struct file *); }; -extern struct nlmsvc_binding * nlmsvc_ops; +extern const struct nlmsvc_binding *nlmsvc_ops; /* * Similar to nfs_client_initdata, but without the NFS-specific |