提交 5680d48b 编写于 作者: C Chuck Lever 提交者: Trond Myklebust

NFS: Clean-up: Define macros for maximum host and export path name lengths

Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 9eaa67c6
......@@ -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;
......
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册