diff -u --new-file --exclude-from ../exclude --recursive linux.vanilla/fs/nfs/inode.c linux.15p6/fs/nfs/inode.c
--- linux.vanilla/fs/nfs/inode.c Tue Jan 4 21:19:00 2000
+++ linux.15p6/fs/nfs/inode.c Wed Jan 12 01:23:39 2000
@@ -212,7 +212,12 @@
if (!data)
goto out_miss_args;
- if (data->version != NFS_MOUNT_VERSION) {
+ /* No NFS V3. */
+ if (data->flags & NFS_MOUNT_VER3)
+ goto out_fail;
+
+ /* Don't complain if "mount" is newer. */
+ if (data->version < NFS_MOUNT_VERSION) {
printk("nfs warning: mount version %s than kernel\n",
data->version < NFS_MOUNT_VERSION ? "older" : "newer");
if (data->version < 2)
diff -u --new-file --exclude-from ../exclude --recursive linux.vanilla/fs/nfsd/nfsfh.c linux.15p6/fs/nfsd/nfsfh.c
--- linux.vanilla/fs/nfsd/nfsfh.c Tue Jan 4 21:19:00 2000
+++ linux.15p6/fs/nfsd/nfsfh.c Thu Jan 13 22:40:20 2000
@@ -455,13 +455,27 @@
break;
}
- result = ERR_PTR(-ENOENT);
- dir = iget_in_use(sb, dirino);
- if (!dir)
- goto out_root;
- dentry = d_alloc_root(dir, NULL);
- if (!dentry)
- goto out_iput;
+ /*
+ * Fix for /// bad export bug: if dirino is the root,
+ * get the real root dentry rather than creating a temporary
+ * "root" dentry. XXX We could extend this to use
+ * any existing dentry for the located 'dir', but all
+ * of this code is going to be completely rewritten soon,
+ * so I won't bother.
+ */
+
+ if (dirino == root_ino) {
+ dentry = dget(root);
+ }
+ else {
+ result = ERR_PTR(-ENOENT);
+ dir = iget_in_use(sb, dirino);
+ if (!dir)
+ goto out_root;
+ dentry = d_alloc_root(dir, NULL);
+ if (!dentry)
+ goto out_iput;
+ }
/*
* Get the name for this inode and the next parent inode.
@@ -847,12 +861,12 @@
dirent.ino = ino;
error = get_parent_ino(parent, &dirent);
if (error) {
-#ifdef NFSD_PARANOIA
+#ifdef NFSD_PARANOIA_EXTREME
printk("lookup_by_inode: ino %ld not found in %s\n", ino, parent->d_name.name);
#endif
goto no_entry;
}
-#ifdef NFSD_PARANOIA
+#ifdef NFSD_PARANOIA_EXTREME
printk("lookup_by_inode: found %s\n", dirent.name);
#endif