From 3cbfc51476a10178f35ca61b888fe5624b4537f8 Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Wed, 29 Aug 2007 17:59:03 -0400 Subject: [PATCH] --- yaml --- r: 64703 b: refs/heads/master c: 7d1cca72994c0e910ca443076dcfcfd473871dda h: refs/heads/master i: 64701: c6d7ee43cb8431cefac9b0eb1f03ea6f98ee221e 64699: 720eb5e0369851010f9a88f5d2e115994ac77617 64695: 8f90c7b3b3370b865183320a66fc87439945af9e 64687: 01668980be8d9250119cdd0af1275f02f06f7690 64671: d9d0e65c9ed4fc86bb88033fed06e259dd9e3e26 64639: 5ce0438dad4ddfcb09a5dbcd88b58556127d9bc7 v: v3 --- [refs] | 2 +- trunk/fs/nfs/super.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 860e23d7fa31..0bbc21d2e513 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 350c73af6af51ae7654dad91874c0d30dd13bbbe +refs/heads/master: 7d1cca72994c0e910ca443076dcfcfd473871dda diff --git a/trunk/fs/nfs/super.c b/trunk/fs/nfs/super.c index ef3643284f72..8ed593766f16 100644 --- a/trunk/fs/nfs/super.c +++ b/trunk/fs/nfs/super.c @@ -1155,13 +1155,13 @@ static int nfs_validate_mount_data(struct nfs_mount_data **options, return -EINVAL; len = c - dev_name; if (len > sizeof(data->hostname)) - return -EINVAL; + return -ENAMETOOLONG; strncpy(data->hostname, dev_name, len); args.nfs_server.hostname = data->hostname; c++; if (strlen(c) > NFS_MAXPATHLEN) - return -EINVAL; + return -ENAMETOOLONG; args.nfs_server.export_path = c; status = nfs_try_mount(&args, mntfh); @@ -1677,7 +1677,7 @@ static int nfs4_validate_mount_data(struct nfs4_mount_data **options, /* while calculating len, pretend ':' is '\0' */ len = c - dev_name; if (len > NFS4_MAXNAMLEN) - return -EINVAL; + return -ENAMETOOLONG; *hostname = kzalloc(len, GFP_KERNEL); if (*hostname == NULL) return -ENOMEM; @@ -1686,7 +1686,7 @@ static int nfs4_validate_mount_data(struct nfs4_mount_data **options, c++; /* step over the ':' */ len = strlen(c); if (len > NFS4_MAXPATHLEN) - return -EINVAL; + return -ENAMETOOLONG; *mntpath = kzalloc(len + 1, GFP_KERNEL); if (*mntpath == NULL) return -ENOMEM;