提交 2a297450 编写于 作者: J Julia Lawall 提交者: J. Bruce Fields

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: NJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 ea44463f
......@@ -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);
......
......@@ -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 */
};
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册