mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
fs: support RWF_NOWAIT for buffered reads
This is based on the old idea and code from Milosz Tanski. With the aio nowait code it becomes mostly trivial now. Buffered writes continue to return -EOPNOTSUPP if RWF_NOWAIT is passed. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
3239d83484
commit
91f9943e1c
5 changed files with 20 additions and 15 deletions
6
fs/aio.c
6
fs/aio.c
|
|
@ -1593,12 +1593,6 @@ static int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
|
|||
goto out_put_req;
|
||||
}
|
||||
|
||||
if ((req->common.ki_flags & IOCB_NOWAIT) &&
|
||||
!(req->common.ki_flags & IOCB_DIRECT)) {
|
||||
ret = -EOPNOTSUPP;
|
||||
goto out_put_req;
|
||||
}
|
||||
|
||||
ret = put_user(KIOCB_KEY, &user_iocb->aio_key);
|
||||
if (unlikely(ret)) {
|
||||
pr_debug("EFAULT: aio_key\n");
|
||||
|
|
|
|||
Loading…
Reference in a new issue