]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging/lustre/llite: constify export_operations structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Fri, 1 Jan 2016 09:02:03 +0000 (10:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2016 22:22:53 +0000 (14:22 -0800)
This export_operations structure is never modified, so declare it as const.
Most other structures of this type are already const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/llite_internal.h
drivers/staging/lustre/lustre/llite/llite_nfs.c

index 845e992ca5fcb9898abb4887f70c9165818d4079..e73024778808a792ae7f7eaf4d0475750fadbad1 100644 (file)
@@ -796,7 +796,7 @@ char *ll_get_fsname(struct super_block *sb, char *buf, int buflen);
 void ll_open_cleanup(struct super_block *sb, struct ptlrpc_request *open_req);
 
 /* llite/llite_nfs.c */
-extern struct export_operations lustre_export_operations;
+extern const struct export_operations lustre_export_operations;
 __u32 get_uuid2int(const char *name, int len);
 void get_uuid2fsid(const char *name, int len, __kernel_fsid_t *fsid);
 struct inode *search_inode_for_lustre(struct super_block *sb,
index 18aab25f9cd9440680c216fc14b340cfc00e5cec..9f64dd18f4522a1ee3c4271c409d5259bd8d7647 100644 (file)
@@ -323,7 +323,7 @@ static struct dentry *ll_get_parent(struct dentry *dchild)
        return result;
 }
 
-struct export_operations lustre_export_operations = {
+const struct export_operations lustre_export_operations = {
        .get_parent = ll_get_parent,
        .encode_fh  = ll_encode_fh,
        .get_name   = ll_get_name,