ext4: Assure that metadata blocks are written during fsync in no journal mode
commit75c1a3f1f6b164f280b7713a8b301e125ae86292
authorTheodore Ts'o <tytso@mit.edu>
Sat, 12 Sep 2009 17:41:55 +0000 (12 13:41 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 14 Dec 2009 16:06:31 +0000 (14 08:06 -0800)
treeafe74a95dc2feaaa33744e373f53f9103442e2a1
parent523a2ab5bf81efa0fc9a1b6afc43e729ddae58f0
ext4: Assure that metadata blocks are written during fsync in no journal mode

(cherry picked from commit fe188c0e084bdf3038dc0ac963c21d764f53f7da)

When there is no journal present, we must attach buffer heads
associated with extent tree and indirect blocks to the inode's
mapping->private_list via mark_buffer_dirty_inode() so that
ext4_sync_file() --- which is called to service fsync() and
fdatasync() system calls --- can write out the inode's metadata blocks
by calling sync_mapping_buffers().

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/ext4_jbd2.c
fs/ext4/fsync.c