patch-2.4.27 linux-2.4.27/fs/hpfs/ea.c

Next file: linux-2.4.27/fs/hpfs/hpfs.h
Previous file: linux-2.4.27/fs/hpfs/buffer.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/fs/hpfs/ea.c linux-2.4.27/fs/hpfs/ea.c
@@ -235,7 +235,7 @@
 		}
 		pos += ea->namelen + ea->valuelen + 5;
 	}
-	if (!fnode->ea_size_s) {
+	if (!fnode->ea_offs) {
 		/*if (fnode->ea_size_s) {
 			hpfs_error(s, "fnode %08x: ea_size_s == %03x, ea_offs == 0",
 				inode->i_ino, fnode->ea_size_s);
@@ -243,15 +243,13 @@
 		}*/
 		fnode->ea_offs = 0xc4;
 	}
-	if (fnode->ea_offs < 0xc4 || fnode->ea_offs + fnode->ea_size_s > 0x200) {
+	if (fnode->ea_offs < 0xc4 || fnode->ea_offs + fnode->acl_size_s + fnode->ea_size_s > 0x200) {
 		hpfs_error(s, "fnode %08x: ea_offs == %03x, ea_size_s == %03x",
 			inode->i_ino, fnode->ea_offs, fnode->ea_size_s);
 		return;
 	}
 	if ((fnode->ea_size_s || !fnode->ea_size_l) &&
-	     fnode->ea_offs + fnode->ea_size_s + strlen(key) + size + 5 <= 0x200) {
-		/* I'm not sure ... maybe we overwrite ACL here. I have no info
-		   on it right now :-( */
+	     fnode->ea_offs + fnode->acl_size_s + fnode->ea_size_s + strlen(key) + size + 5 <= 0x200) {
 		ea = fnode_end_ea(fnode);
 		*(char *)ea = 0;
 		ea->namelen = strlen(key);

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