patch-2.4.20 linux-2.4.20/fs/ext3/fsync.c

Next file: linux-2.4.20/fs/ext3/ialloc.c
Previous file: linux-2.4.20/fs/ext3/file.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/fs/ext3/fsync.c linux-2.4.20/fs/ext3/fsync.c
@@ -62,7 +62,12 @@
 	 * we'll end up waiting on them in commit.
 	 */
 	ret = fsync_inode_buffers(inode);
-	ret |= fsync_inode_data_buffers(inode);
+
+	/* In writeback mode, we need to force out data buffers too.  In
+	 * the other modes, ext3_force_commit takes care of forcing out
+	 * just the right data blocks. */
+	if (test_opt(inode->i_sb, DATA_FLAGS) == EXT3_MOUNT_WRITEBACK_DATA)
+		ret |= fsync_inode_data_buffers(inode);
 
 	ext3_force_commit(inode->i_sb);
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)