mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
mirror O_APPEND and O_DIRECT into iocb->ki_flags
... avoiding write_iter/fcntl races. Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
3309dd04cb
commit
2ba48ce513
11 changed files with 38 additions and 23 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue