patch-2.2.17 linux/fs/ext2/namei.c

Next file: linux/fs/ext2/super.c
Previous file: linux/fs/ext2/acl.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.16/fs/ext2/namei.c linux/fs/ext2/namei.c
@@ -418,6 +418,10 @@
 		if (EXT2_HAS_INCOMPAT_FEATURE(dir->i_sb,
 					      EXT2_FEATURE_INCOMPAT_FILETYPE))
 			de->file_type = EXT2_FT_REG_FILE;
+	} else if (S_ISSOCK(inode->i_mode)) {
+		if (EXT2_HAS_INCOMPAT_FEATURE(dir->i_sb,
+					      EXT2_FEATURE_INCOMPAT_FILETYPE))
+			de->file_type = EXT2_FT_SOCK;
 	} else if (S_ISCHR(inode->i_mode)) {
 		inode->i_op = &chrdev_inode_operations;
 		if (EXT2_HAS_INCOMPAT_FEATURE(dir->i_sb,
@@ -793,6 +797,8 @@
 			de->file_type = EXT2_FT_DIR;
 		else if (S_ISLNK(inode->i_mode))
 			de->file_type = EXT2_FT_SYMLINK;
+		else if (S_ISSOCK(inode->i_mode))  
+			de->file_type = EXT2_FT_SOCK;
 		else if (S_ISCHR(inode->i_mode))
 			de->file_type = EXT2_FT_CHRDEV;
 		else if (S_ISBLK(inode->i_mode))

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