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-05-01 19:58:39 -04:00
committed by Al Viro
parent 716b9bc0cb
commit dde0c2e798
13 changed files with 25 additions and 16 deletions
+1 -1
View File
@@ -2794,7 +2794,7 @@ ssize_t generic_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
if (ret > 0) {
ssize_t err;
err = generic_write_sync(file, iocb->ki_pos - ret, ret);
err = generic_write_sync(iocb, iocb->ki_pos - ret, ret);
if (err < 0)
ret = err;
}