Skip to contentSkip to conversation

Bug in ext3 when setting +j on inode

PATCH New Jan Kara 1 participant 1 message Jan 19, 2004 VFS

lore
Share & tools
lore

Jan Kara

author reviewer
#0 lore raw

PATCH 1/1 Bug in ext3 when setting +j on inode

Hi,

I think there's a problem that when inode is set data journalled then
its inode operations are not updated correctly. Attached patch fixes that. The patch is against 2.6.0 but should apply to 2.6.1 well.

Honza

Signature · 22 lines
Jan Kara <[email protected]>
SuSE CR Labs

diff -ruNX /home/jack/.kerndiffexclude linux-2.6.0-um/fs/ext3/inode.c linux-2.6.0-um-1-jquota/fs/ext3/inode.c
--- linux-2.6.0-um/fs/ext3/inode.c	2003-11-26 21:44:43.000000000 +0100
+++ linux-2.6.0-um-1-jquota/fs/ext3/inode.c	2004-01-18 20:32:17.000000000 +0100
@@ -3032,10 +3050,14 @@
 	 * the inode's in-core data-journaling state flag now.
 	 */
 
-	if (val)
+	if (val) {
 		EXT3_I(inode)->i_flags |= EXT3_JOURNAL_DATA_FL;
-	else
+		ext3_set_aops(inode);
+	}
+	else {
 		EXT3_I(inode)->i_flags &= ~EXT3_JOURNAL_DATA_FL;
+		ext3_set_aops(inode);
+	}
 
 	journal_unlock_updates(journal);