Skip to contentSkip to conversation

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

PATCH In review Chuck Lever 1 participant 1 message Jul 1, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/21 NFS: Clean-up: Define macros for maximum host and export path name lengths

---

 fs/nfs/super.c            |    4 ++--
 include/linux/nfs_mount.h |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
fs/nfs/super.c +2 -2
index a83cb07..1fedc30 100644
@@ -918,12 +918,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;
include/linux/nfs_mount.h +1 -1
index 3e3b521..a3ade89 100644
@@ -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 */

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs