]> err.no Git - linux-2.6/blobdiff - fs/nfs/super.c
knfsd: nfsv4 delegation recall should take reference on client
[linux-2.6] / fs / nfs / super.c
index ef3643284f72eaff73c1bccedf5ba17f5004cb90..b878528b64c1a9d0aed22fd19b20339bc1644b22 100644 (file)
@@ -345,8 +345,8 @@ void __exit unregister_nfs_fs(void)
        unregister_shrinker(&acl_shrinker);
 #ifdef CONFIG_NFS_V4
        unregister_filesystem(&nfs4_fs_type);
-       nfs_unregister_sysctl();
 #endif
+       nfs_unregister_sysctl();
        unregister_filesystem(&nfs_fs_type);
 }
 
@@ -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;