diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-09 13:52:01 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-11 22:30:22 -0400 |
commit | 2ba48ce513c4e545318d22b138861d5876edf906 (patch) | |
tree | 0e2a5130ead5c71f0b079b1acd620fba98f99256 /fs/btrfs/file.c | |
parent | 3309dd04cbcd2cdad168485af5cf3576b5051e49 (diff) |
mirror O_APPEND and O_DIRECT into iocb->ki_flags
... avoiding write_iter/fcntl races.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index c64d11c41eeb..faa7d390841b 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -1794,7 +1794,7 @@ static ssize_t btrfs_file_write_iter(struct kiocb *iocb, | |||
1794 | if (sync) | 1794 | if (sync) |
1795 | atomic_inc(&BTRFS_I(inode)->sync_writers); | 1795 | atomic_inc(&BTRFS_I(inode)->sync_writers); |
1796 | 1796 | ||
1797 | if (file->f_flags & O_DIRECT) { | 1797 | if (iocb->ki_flags & IOCB_DIRECT) { |
1798 | num_written = __btrfs_direct_write(iocb, from, pos); | 1798 | num_written = __btrfs_direct_write(iocb, from, pos); |
1799 | } else { | 1799 | } else { |
1800 | num_written = __btrfs_buffered_write(file, from, pos); | 1800 | num_written = __btrfs_buffered_write(file, from, pos); |