diff --git a/[refs] b/[refs] index 19b75688ff72..945c4b00c49d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 163e783e6a8b1e8bcb4c9084d438091386b589df +refs/heads/master: 524724ed1f224875a117be593540591ed050c73d diff --git a/trunk/fs/btrfs/file.c b/trunk/fs/btrfs/file.c index 0726a734ee38..126477eaecf5 100644 --- a/trunk/fs/btrfs/file.c +++ b/trunk/fs/btrfs/file.c @@ -1157,6 +1157,8 @@ int btrfs_sync_file(struct file *file, struct dentry *dentry, int datasync) btrfs_wait_ordered_range(inode, 0, (u64)-1); root->log_batch++; + if (datasync && !(inode->i_state & I_DIRTY_PAGES)) + goto out; /* * ok we haven't committed the transaction yet, lets do a commit */