patch-2.1.118 linux/fs/nfs/dir.c

Next file: linux/fs/nfs/file.c
Previous file: linux/fs/ncpfs/file.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.117/linux/fs/nfs/dir.c linux/fs/nfs/dir.c
@@ -14,13 +14,6 @@
  *              Following Linus comments on my original hack, this version
  *              depends only on the dcache stuff and doesn't touch the inode
  *              layer (iput() and friends).
- * 04 Aug 1998  Ion Badulescu <[email protected]>     
- *	        FIFO's need special handling in NFSv2
- */
-
-/*
- * Fixes:
- *    Ion Badulescu <[email protected]>     : FIFO's need special handling in NFSv2
  */
 
 #include <linux/sched.h>
@@ -86,6 +79,7 @@
 	NULL,			/* ioctl - default */
 	NULL,			/* mmap */
 	nfs_dir_open,		/* open - revalidate */
+	NULL,			/* flush */
 	NULL,			/* no special release code */
 	NULL			/* fsync */
 };
@@ -652,10 +646,7 @@
 	if (dentry->d_name.len > NFS_MAXNAMLEN)
 		goto out;
 
- 	if (mode & S_IFIFO)
- 		sattr.mode = (mode & ~S_IFMT) | S_IFCHR;
- 	else
- 		sattr.mode = mode;
+	sattr.mode = mode;
 	sattr.uid = sattr.gid = sattr.size = (unsigned) -1;
 	sattr.atime.seconds = sattr.mtime.seconds = (unsigned) -1;
 
@@ -665,15 +656,6 @@
 	nfs_invalidate_dircache(dir);
 	error = nfs_proc_create(NFS_SERVER(dir), NFS_FH(dentry->d_parent),
 			dentry->d_name.name, &sattr, &fhandle, &fattr);
-	/*
-	 *	Retry invalid FIFO creates as the original object
-	 *	to cover for NFS servers that don't cope.
-	 */
-	if (error == -EINVAL && (mode & S_IFIFO)) {
-		sattr.mode = mode;
-		error = nfs_proc_create(NFS_SERVER(dir), NFS_FH(dentry->d_parent),
-					dentry->d_name.name, &sattr, &fhandle, &fattr);
-	}
 	if (!error)
 		error = nfs_instantiate(dentry, &fhandle, &fattr);
 	if (error)
@@ -703,10 +685,7 @@
 	if (dentry->d_name.len > NFS_MAXNAMLEN)
 		return -ENAMETOOLONG;
 
-	if (mode & S_IFIFO)
-		sattr.mode = (mode & ~S_IFMT) | S_IFCHR;
-	else
-		sattr.mode = mode;
+	sattr.mode = mode;
 	sattr.uid = sattr.gid = sattr.size = (unsigned) -1;
 	if (S_ISCHR(mode) || S_ISBLK(mode))
 		sattr.size = rdev; /* get out your barf bag */
@@ -715,11 +694,6 @@
 	nfs_invalidate_dircache(dir);
 	error = nfs_proc_create(NFS_SERVER(dir), NFS_FH(dentry->d_parent),
 				dentry->d_name.name, &sattr, &fhandle, &fattr);
-	if (error == -EINVAL && (mode & S_IFIFO)) {
-		sattr.mode = mode;
-		error = nfs_proc_create(NFS_SERVER(dir), NFS_FH(dentry->d_parent),
-					dentry->d_name.name, &sattr, &fhandle, &fattr);
-	}
 	if (!error)
 		error = nfs_instantiate(dentry, &fhandle, &fattr);
 	if (error)

FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected]