Commit 38c75d44 authored by Seiji Kihara's avatar Seiji Kihara Committed by Linus Torvalds

[PATCH] ext3: journalled data fsync fix

This optimisation data=journal isn't working right, because journalled-data
pages are not marked dirty when they are dirty against the journal.  Hence
I_DIRTY_PAGES doesn't get set hence we can fail to sync the file under some
circumstances.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 25e01e8c
...@@ -49,10 +49,6 @@ int ext3_sync_file(struct file * file, struct dentry *dentry, int datasync) ...@@ -49,10 +49,6 @@ int ext3_sync_file(struct file * file, struct dentry *dentry, int datasync)
J_ASSERT(ext3_journal_current_handle() == 0); J_ASSERT(ext3_journal_current_handle() == 0);
smp_mb(); /* prepare for lockless i_state read */
if (!(inode->i_state & I_DIRTY))
goto out;
/* /*
* data=writeback: * data=writeback:
* The caller's filemap_fdatawrite()/wait will sync the data. * The caller's filemap_fdatawrite()/wait will sync the data.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment