Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ext2: also update the inode on disk when dir is IS_DIRSYNC

We used to just write changed page for IS_DIRSYNC inodes. But we also
have to update the directory inode itself just for the case that we've
allocated a new block and changed i_size.

[akpm@linux-foundation.org: still sync the data page]
Signed-off-by: Jan Kara <jack@suse.cz>
Tested-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Jan Kara and committed by
Linus Torvalds
6b7021ef 634a84f8

+5 -2
+5 -2
fs/ext2/dir.c
··· 95 95 mark_inode_dirty(dir); 96 96 } 97 97 98 - if (IS_DIRSYNC(dir)) 98 + if (IS_DIRSYNC(dir)) { 99 99 err = write_one_page(page, 1); 100 - else 100 + if (!err) 101 + err = ext2_sync_inode(dir); 102 + } else { 101 103 unlock_page(page); 104 + } 102 105 103 106 return err; 104 107 }