aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r--fs/btrfs/file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index d146dde7efb6..29ff749ff4ca 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -28,6 +28,7 @@
28#include <linux/writeback.h> 28#include <linux/writeback.h>
29#include <linux/statfs.h> 29#include <linux/statfs.h>
30#include <linux/compat.h> 30#include <linux/compat.h>
31#include <linux/slab.h>
31#include "ctree.h" 32#include "ctree.h"
32#include "disk-io.h" 33#include "disk-io.h"
33#include "transaction.h" 34#include "transaction.h"
@@ -839,7 +840,7 @@ static ssize_t btrfs_file_write(struct file *file, const char __user *buf,
839 unsigned long last_index; 840 unsigned long last_index;
840 int will_write; 841 int will_write;
841 842
842 will_write = ((file->f_flags & O_SYNC) || IS_SYNC(inode) || 843 will_write = ((file->f_flags & O_DSYNC) || IS_SYNC(inode) ||
843 (file->f_flags & O_DIRECT)); 844 (file->f_flags & O_DIRECT));
844 845
845 nrptrs = min((count + PAGE_CACHE_SIZE - 1) / PAGE_CACHE_SIZE, 846 nrptrs = min((count + PAGE_CACHE_SIZE - 1) / PAGE_CACHE_SIZE,
@@ -1006,7 +1007,7 @@ out_nolock:
1006 if (err) 1007 if (err)
1007 num_written = err; 1008 num_written = err;
1008 1009
1009 if ((file->f_flags & O_SYNC) || IS_SYNC(inode)) { 1010 if ((file->f_flags & O_DSYNC) || IS_SYNC(inode)) {
1010 trans = btrfs_start_transaction(root, 1); 1011 trans = btrfs_start_transaction(root, 1);
1011 ret = btrfs_log_dentry_safe(trans, root, 1012 ret = btrfs_log_dentry_safe(trans, root,
1012 file->f_dentry); 1013 file->f_dentry);