fs: add IOCB_SYNC and IOCB_DSYNC

This will allow us to do per-I/O sync file writes, as required by a lot
of fileservers or storage targets.

XXX: Will need a few additional audits for O_DSYNC

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Christoph Hellwig
2016-04-07 08:52:00 -07:00
committed by Al Viro
parent 716b9bc0cb
commit dde0c2e798
13 changed files with 25 additions and 16 deletions

View File

@@ -1953,7 +1953,7 @@ static ssize_t ntfs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
current->backing_dev_info = NULL;
inode_unlock(vi);
if (likely(written > 0)) {
err = generic_write_sync(file, iocb->ki_pos, written);
err = generic_write_sync(iocb, iocb->ki_pos, written);
if (err < 0)
written = 0;
}