Message ID | 20161003033409.GT19539@ZenIV.linux.org.uk (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
diff --git a/fs/direct-io.c b/fs/direct-io.c index 7c3ce73..3a8ebda 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -246,6 +246,8 @@ static ssize_t dio_complete(struct dio *dio, ssize_t ret, bool is_async) if ((dio->op == REQ_OP_READ) && ((offset + transferred) > dio->i_size)) transferred = dio->i_size - offset; + if (ret == -EFAULT) + ret = 0; } if (ret == 0)