From: Seiji Kihara <kihara.seiji@lab.ntt.co.jp>

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: Andrew Morton <akpm@osdl.org>
---

 25-akpm/fs/ext3/fsync.c |    4 ----
 1 files changed, 4 deletions(-)

diff -puN fs/ext3/fsync.c~ext3-journal-data-fsync-fix fs/ext3/fsync.c
--- 25/fs/ext3/fsync.c~ext3-journal-data-fsync-fix	2004-09-18 16:37:38.621135904 -0700
+++ 25-akpm/fs/ext3/fsync.c	2004-09-18 16:37:47.418798456 -0700
@@ -49,10 +49,6 @@ int ext3_sync_file(struct file * file, s
 
 	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:
 	 *  The caller's filemap_fdatawrite()/wait will sync the data.
_