Add some extra const qualifiers into NFS.
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
 /*
  * Clone a mountpoint of the appropriate type
  */
-static struct vfsmount *nfs_do_clone_mount(struct nfs_server *server, char *devname,
+static struct vfsmount *nfs_do_clone_mount(struct nfs_server *server,
+                                          const char *devname,
                                           struct nfs_clone_mount *mountdata)
 {
 #ifdef CONFIG_NFS_V4
 
        return nlmclnt_proc(filp->f_dentry->d_inode, cmd, fl);
 }
 
-struct nfs_rpc_ops     nfs_v3_clientops = {
+const struct nfs_rpc_ops nfs_v3_clientops = {
        .version        = 3,                    /* protocol version */
        .dentry_ops     = &nfs_dentry_operations,
        .dir_inode_ops  = &nfs3_dir_inode_operations,
 
 /*
  * Check if fs_root is valid
  */
-static inline char *nfs4_pathname_string(struct nfs4_pathname *pathname,
+static inline char *nfs4_pathname_string(const struct nfs4_pathname *pathname,
                                         char *buffer, ssize_t buflen)
 {
        char *end = buffer + buflen;
 
        n = pathname->ncomponents;
        while (--n >= 0) {
-               struct nfs4_string *component = &pathname->components[n];
+               const struct nfs4_string *component = &pathname->components[n];
                buflen -= component->len + 1;
                if (buflen < 0)
                        goto Elong;
  */
 static struct vfsmount *nfs_follow_referral(const struct vfsmount *mnt_parent,
                                            const struct dentry *dentry,
-                                           struct nfs4_fs_locations *locations)
+                                           const struct nfs4_fs_locations *locations)
 {
        struct vfsmount *mnt = ERR_PTR(-ENOENT);
        struct nfs_clone_mount mountdata = {
 
        loc = 0;
        while (loc < locations->nlocations && IS_ERR(mnt)) {
-               struct nfs4_fs_location *location = &locations->locations[loc];
+               const struct nfs4_fs_location *location = &locations->locations[loc];
                char *mnt_path;
 
                if (location == NULL || location->nservers <= 0 ||
 
        .listxattr      = nfs4_listxattr,
 };
 
-struct nfs_rpc_ops     nfs_v4_clientops = {
+const struct nfs_rpc_ops nfs_v4_clientops = {
        .version        = 4,                    /* protocol version */
        .dentry_ops     = &nfs4_dentry_operations,
        .dir_inode_ops  = &nfs4_dir_inode_operations,
 
 }
 
 
-struct nfs_rpc_ops     nfs_v2_clientops = {
+const struct nfs_rpc_ops nfs_v2_clientops = {
        .version        = 2,                   /* protocol version */
        .dentry_ops     = &nfs_dentry_operations,
        .dir_inode_ops  = &nfs_dir_inode_operations,
 
  */
 static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss, int showdefaults)
 {
-       static struct proc_nfs_info {
+       static const struct proc_nfs_info {
                int flag;
-               char *str;
-               char *nostr;
+               const char *str;
+               const char *nostr;
        } nfs_info[] = {
                { NFS_MOUNT_SOFT, ",soft", ",hard" },
                { NFS_MOUNT_INTR, ",intr", "" },
                { NFS_MOUNT_NOACL, ",noacl", "" },
                { 0, NULL, NULL }
        };
-       struct proc_nfs_info *nfs_infop;
+       const struct proc_nfs_info *nfs_infop;
        char buf[12];
-       char *proto;
+       const char *proto;
 
        seq_printf(m, ",vers=%d", nfss->rpc_ops->version);
        seq_printf(m, ",rsize=%d", nfss->rsize);
 
        struct rpc_clnt *       client;         /* RPC client handle */
        struct rpc_clnt *       client_sys;     /* 2nd handle for FSINFO */
        struct rpc_clnt *       client_acl;     /* ACL RPC client handle */
-       struct nfs_rpc_ops *    rpc_ops;        /* NFS protocol vector */
+       const struct nfs_rpc_ops *rpc_ops;      /* NFS protocol vector */
        struct nfs_iostats *    io_stats;       /* I/O statistics */
        struct backing_dev_info backing_dev_info;
        int                     flags;          /* various flags */
 
 /*
  * Function vectors etc. for the NFS client
  */
-extern struct nfs_rpc_ops      nfs_v2_clientops;
-extern struct nfs_rpc_ops      nfs_v3_clientops;
-extern struct nfs_rpc_ops      nfs_v4_clientops;
+extern const struct nfs_rpc_ops        nfs_v2_clientops;
+extern const struct nfs_rpc_ops        nfs_v3_clientops;
+extern const struct nfs_rpc_ops        nfs_v4_clientops;
 extern struct rpc_version      nfs_version2;
 extern struct rpc_version      nfs_version3;
 extern struct rpc_version      nfs_version4;