diff options
-rw-r--r-- | fs/nfs/super.c | 4 | ||||
-rw-r--r-- | include/linux/nfs_mount.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 14c7923697d2..e7d197085834 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -867,12 +867,12 @@ static int nfs4_get_sb(struct file_system_type *fs_type, | |||
867 | } | 867 | } |
868 | } | 868 | } |
869 | 869 | ||
870 | p = nfs_copy_user_string(NULL, &data->hostname, 256); | 870 | p = nfs_copy_user_string(NULL, &data->hostname, NFS4_MAXNAMLEN); |
871 | if (IS_ERR(p)) | 871 | if (IS_ERR(p)) |
872 | goto out_err; | 872 | goto out_err; |
873 | hostname = p; | 873 | hostname = p; |
874 | 874 | ||
875 | p = nfs_copy_user_string(NULL, &data->mnt_path, 1024); | 875 | p = nfs_copy_user_string(NULL, &data->mnt_path, NFS4_MAXPATHLEN); |
876 | if (IS_ERR(p)) | 876 | if (IS_ERR(p)) |
877 | goto out_err; | 877 | goto out_err; |
878 | mntpath = p; | 878 | mntpath = p; |
diff --git a/include/linux/nfs_mount.h b/include/linux/nfs_mount.h index cc8b9c59acb8..0b82a17c705b 100644 --- a/include/linux/nfs_mount.h +++ b/include/linux/nfs_mount.h | |||
@@ -37,7 +37,7 @@ struct nfs_mount_data { | |||
37 | int acdirmin; /* 1 */ | 37 | int acdirmin; /* 1 */ |
38 | int acdirmax; /* 1 */ | 38 | int acdirmax; /* 1 */ |
39 | struct sockaddr_in addr; /* 1 */ | 39 | struct sockaddr_in addr; /* 1 */ |
40 | char hostname[256]; /* 1 */ | 40 | char hostname[NFS_MAXNAMLEN + 1]; /* 1 */ |
41 | int namlen; /* 2 */ | 41 | int namlen; /* 2 */ |
42 | unsigned int bsize; /* 3 */ | 42 | unsigned int bsize; /* 3 */ |
43 | struct nfs3_fh root; /* 4 */ | 43 | struct nfs3_fh root; /* 4 */ |