[PATCH] ext2 file_type corruption

From: Brian Gerst (bgerst@quark.vpplus.com)
Date: Wed Apr 12 2000 - 20:34:43 EST


The file_type field in the directory entry was unconditionally being set
to zero, causing fsck to complain. The patch is simple and obvious.

-- 

Brian Gerst

--- linux-2.3.99p6-1/fs/ext2/namei.c Wed Apr 12 00:28:25 2000 +++ linux/fs/ext2/namei.c Wed Apr 12 21:20:54 2000 @@ -284,13 +284,13 @@ de->rec_len = cpu_to_le16(EXT2_DIR_REC_LEN(de->name_len)); de = de1; } + de->file_type = 0; if (inode) { de->inode = cpu_to_le32(inode->i_ino); ext2_set_de_type(dir->i_sb, de, inode->i_mode); } else de->inode = 0; de->name_len = namelen; - de->file_type = 0; memcpy (de->name, name, namelen); /* * XXX shouldn't update any times until successful

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:20 EST