diff options
| -rw-r--r-- | fs/ocfs2/file.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 1a96cac31791..07267e0da909 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
| @@ -187,6 +187,9 @@ static int ocfs2_sync_file(struct file *file, | |||
| 187 | if (err) | 187 | if (err) |
| 188 | goto bail; | 188 | goto bail; |
| 189 | 189 | ||
| 190 | if (datasync && !(inode->i_state & I_DIRTY_DATASYNC)) | ||
| 191 | goto bail; | ||
| 192 | |||
| 190 | journal = osb->journal->j_journal; | 193 | journal = osb->journal->j_journal; |
| 191 | err = jbd2_journal_force_commit(journal); | 194 | err = jbd2_journal_force_commit(journal); |
| 192 | 195 | ||
