]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ext3: update a_ops when running `chattr +j'
authorAndrew Morton <akpm@osdl.org>
Tue, 20 Jan 2004 11:16:11 +0000 (03:16 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 20 Jan 2004 11:16:11 +0000 (03:16 -0800)
From: Jan Kara <jack@suse.cz>

Journalled-data files need a different set of address_space_operations, so
we need to update the file's aops when someone runs `chattr +j' on the
file.

fs/ext3/inode.c

index e5b60217d34adbc64bda20b46637857bdf7d841b..4b60f7c13bbb09bd85526782a2f083572aac8916 100644 (file)
@@ -3036,6 +3036,7 @@ int ext3_change_inode_journal_flag(struct inode *inode, int val)
                EXT3_I(inode)->i_flags |= EXT3_JOURNAL_DATA_FL;
        else
                EXT3_I(inode)->i_flags &= ~EXT3_JOURNAL_DATA_FL;
+       ext3_set_aops(inode);
 
        journal_unlock_updates(journal);