diff options
Diffstat (limited to 'fs/aio.c')
| -rw-r--r-- | fs/aio.c | 10 |
1 files changed, 9 insertions, 1 deletions
| @@ -712,8 +712,16 @@ static ssize_t aio_run_iocb(struct kiocb *iocb) | |||
| 712 | */ | 712 | */ |
| 713 | ret = retry(iocb); | 713 | ret = retry(iocb); |
| 714 | 714 | ||
| 715 | if (ret != -EIOCBRETRY && ret != -EIOCBQUEUED) | 715 | if (ret != -EIOCBRETRY && ret != -EIOCBQUEUED) { |
| 716 | /* | ||
| 717 | * There's no easy way to restart the syscall since other AIO's | ||
| 718 | * may be already running. Just fail this IO with EINTR. | ||
| 719 | */ | ||
| 720 | if (unlikely(ret == -ERESTARTSYS || ret == -ERESTARTNOINTR || | ||
| 721 | ret == -ERESTARTNOHAND || ret == -ERESTART_RESTARTBLOCK)) | ||
| 722 | ret = -EINTR; | ||
| 716 | aio_complete(iocb, ret, 0); | 723 | aio_complete(iocb, ret, 0); |
| 724 | } | ||
| 717 | out: | 725 | out: |
| 718 | spin_lock_irq(&ctx->ctx_lock); | 726 | spin_lock_irq(&ctx->ctx_lock); |
| 719 | 727 | ||
