patch-1.3.60 linux/fs/namei.c

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

diff -u --recursive --new-file v1.3.59/linux/fs/namei.c linux/fs/namei.c
@@ -396,7 +396,17 @@
 		iput(inode);
 		return error;
 	}
-	if (S_ISBLK(inode->i_mode) || S_ISCHR(inode->i_mode)) {
+	if (S_ISFIFO(inode->i_mode) || S_ISSOCK(inode->i_mode)) {
+		/*
+		 * 2-Feb-1995 Bruce Perens <Bruce@Pixar.com>
+		 * Allow opens of Unix domain sockets and FIFOs for write on
+		 * read-only filesystems. Their data does not live on the disk.
+		 *
+		 * If there was something like IS_NODEV(inode) for
+		 * pipes and/or sockets I'd check it here.
+		 */
+	}
+	else if (S_ISBLK(inode->i_mode) || S_ISCHR(inode->i_mode)) {
 		if (IS_NODEV(inode)) {
 			iput(inode);
 			return -EACCES;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this