Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
[sfrench/cifs-2.6.git] / fs / btrfs / file.c
index ae96fdae1f7de9e4c2f91035f6d26497a1393d7f..c02033596f02237aaeaabb2795960c2b29bd0e7b 100644 (file)
@@ -832,7 +832,7 @@ static ssize_t btrfs_file_write(struct file *file, const char __user *buf,
        unsigned long last_index;
        int will_write;
 
-       will_write = ((file->f_flags & O_SYNC) || IS_SYNC(inode) ||
+       will_write = ((file->f_flags & O_DSYNC) || IS_SYNC(inode) ||
                      (file->f_flags & O_DIRECT));
 
        nrptrs = min((count + PAGE_CACHE_SIZE - 1) / PAGE_CACHE_SIZE,
@@ -999,7 +999,7 @@ out_nolock:
                if (err)
                        num_written = err;
 
-               if ((file->f_flags & O_SYNC) || IS_SYNC(inode)) {
+               if ((file->f_flags & O_DSYNC) || IS_SYNC(inode)) {
                        trans = btrfs_start_transaction(root, 1);
                        ret = btrfs_log_dentry_safe(trans, root,
                                                    file->f_dentry);