patch-2.3.1 linux/fs/nfs/inode.c

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

diff -u --recursive --new-file v2.3.0/linux/fs/nfs/inode.c linux/fs/nfs/inode.c
@@ -470,16 +470,8 @@
 			inode->i_op = &nfs_dir_inode_operations;
 		else if (S_ISLNK(inode->i_mode))
 			inode->i_op = &nfs_symlink_inode_operations;
-		else if (S_ISCHR(inode->i_mode)) {
-			inode->i_op = &chrdev_inode_operations;
-			inode->i_rdev = to_kdev_t(fattr->rdev);
-		} else if (S_ISBLK(inode->i_mode)) {
-			inode->i_op = &blkdev_inode_operations;
-			inode->i_rdev = to_kdev_t(fattr->rdev);
-		} else if (S_ISFIFO(inode->i_mode))
-			init_fifo(inode);
 		else
-			inode->i_op = NULL;
+			init_special_inode(inode, inode->i_mode, fattr->rdev);
 		/*
 		 * Preset the size and mtime, as there's no need
 		 * to invalidate the caches.

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)