]> err.no Git - linux-2.6/commitdiff
NFS: Clean-up: Define macros for maximum host and export path name lengths
authorChuck Lever <chuck.lever@oracle.com>
Sun, 1 Jul 2007 16:12:24 +0000 (12:12 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 11 Jul 2007 03:40:44 +0000 (23:40 -0400)
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/super.c
include/linux/nfs_mount.h

index 14c7923697d2521af994eecc1819d857988d375d..e7d197085834bb715fd1af8a8344b2c3bdf09df4 100644 (file)
@@ -867,12 +867,12 @@ static int nfs4_get_sb(struct file_system_type *fs_type,
                }
        }
 
-       p = nfs_copy_user_string(NULL, &data->hostname, 256);
+       p = nfs_copy_user_string(NULL, &data->hostname, NFS4_MAXNAMLEN);
        if (IS_ERR(p))
                goto out_err;
        hostname = p;
 
-       p = nfs_copy_user_string(NULL, &data->mnt_path, 1024);
+       p = nfs_copy_user_string(NULL, &data->mnt_path, NFS4_MAXPATHLEN);
        if (IS_ERR(p))
                goto out_err;
        mntpath = p;
index cc8b9c59acb8607005e7a891efbb74b29ac6a994..0b82a17c705bbb8a51d595364ab6631b0a33b2dd 100644 (file)
@@ -37,7 +37,7 @@ struct nfs_mount_data {
        int             acdirmin;               /* 1 */
        int             acdirmax;               /* 1 */
        struct sockaddr_in addr;                /* 1 */
-       char            hostname[256];          /* 1 */
+       char            hostname[NFS_MAXNAMLEN + 1];            /* 1 */
        int             namlen;                 /* 2 */
        unsigned int    bsize;                  /* 3 */
        struct nfs3_fh  root;                   /* 4 */