diff options
Diffstat (limited to 'fs/ext3/fsync.c')
-rw-r--r-- | fs/ext3/fsync.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext3/fsync.c b/fs/ext3/fsync.c index a588e23..d336341 100644 --- a/fs/ext3/fsync.c +++ b/fs/ext3/fsync.c @@ -72,6 +72,9 @@ int ext3_sync_file(struct file * file, struct dentry *dentry, int datasync) goto out; } + if (datasync && !(inode->i_state & I_DIRTY_DATASYNC)) + goto out; + /* * The VFS has written the file data. If the inode is unaltered * then we need not start a commit. |