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

Next file: linux/fs/fat/misc.c
Previous file: linux/fs/dquot.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.40/linux/fs/ext2/namei.c linux/fs/ext2/namei.c
@@ -345,18 +345,20 @@
 				umode_t mode) {
 	if (!EXT2_HAS_INCOMPAT_FEATURE(sb, EXT2_FEATURE_INCOMPAT_FILETYPE))
 		return;
-	if (S_ISCHR(mode))
+	if (S_ISREG(mode))
+		de->file_type = EXT2_FT_REG_FILE;
+	else if (S_ISDIR(mode))
+		de->file_type = EXT2_FT_DIR;
+	else if (S_ISLNK(mode))
+		de->file_type = EXT2_FT_SYMLINK;
+	else if (S_ISSOCK(mode))
+		de->file_type = EXT2_FT_SOCK;
+	else if (S_ISFIFO(mode))
+		de->file_type = EXT2_FT_FIFO;
+	else if (S_ISCHR(mode))
 		de->file_type = EXT2_FT_CHRDEV;
 	else if (S_ISBLK(mode))
 		de->file_type = EXT2_FT_BLKDEV;
-	else if (S_ISFIFO(mode))  
-		de->file_type = EXT2_FT_FIFO;
-	else if (S_ISLNK(mode))
-		de->file_type = EXT2_FT_SYMLINK;
-	else if (S_ISREG(mode))
-		de->file_type = EXT2_FT_REG_FILE;
-	else if (S_ISDIR(mode))  
-		de->file_type = EXT2_FT_DIR;
 }
 
 /*

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