diff options
-rw-r--r-- | fs/btrfs/file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 0726a734ee38..126477eaecf5 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -1157,6 +1157,8 @@ int btrfs_sync_file(struct file *file, struct dentry *dentry, int datasync) | |||
1157 | btrfs_wait_ordered_range(inode, 0, (u64)-1); | 1157 | btrfs_wait_ordered_range(inode, 0, (u64)-1); |
1158 | root->log_batch++; | 1158 | root->log_batch++; |
1159 | 1159 | ||
1160 | if (datasync && !(inode->i_state & I_DIRTY_PAGES)) | ||
1161 | goto out; | ||
1160 | /* | 1162 | /* |
1161 | * ok we haven't committed the transaction yet, lets do a commit | 1163 | * ok we haven't committed the transaction yet, lets do a commit |
1162 | */ | 1164 | */ |