summaryrefslogtreecommitdiffstats
path: root/fs/fuse
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-04-09 13:52:01 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-04-11 22:30:22 -0400
commit2ba48ce513c4e545318d22b138861d5876edf906 (patch)
tree0e2a5130ead5c71f0b079b1acd620fba98f99256 /fs/fuse
parent3309dd04cbcd2cdad168485af5cf3576b5051e49 (diff)
downloadop-kernel-dev-2ba48ce513c4e545318d22b138861d5876edf906.zip
op-kernel-dev-2ba48ce513c4e545318d22b138861d5876edf906.tar.gz
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/fuse')
-rw-r--r--fs/fuse/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index b86c8e0..5ef05b5 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1177,7 +1177,7 @@ static ssize_t fuse_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
if (err)
goto out;
- if (file->f_flags & O_DIRECT) {
+ if (iocb->ki_flags & IOCB_DIRECT) {
loff_t pos = iocb->ki_pos;
written = generic_file_direct_write(iocb, from, pos);
if (written < 0 || !iov_iter_count(from))
OpenPOWER on IntegriCloud