Commit 99a7895e authored by Kirill Tkhai's avatar Kirill Tkhai Committed by Pavel Emelyanov

aio: Fix mmap retval analysing

MAP_FAILED is retval of lib'c mmap(). Direct syscall
returns IS_ERR() in case of error.
Signed-off-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 7b84bc88
...@@ -613,7 +613,7 @@ static int restore_aio_ring(struct rst_aio_ring *raio) ...@@ -613,7 +613,7 @@ static int restore_aio_ring(struct rst_aio_ring *raio)
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
iocbp = (void *)iocb + sizeof(struct iocb); iocbp = (void *)iocb + sizeof(struct iocb);
if (iocb == MAP_FAILED) { if (IS_ERR(iocb)) {
pr_err("Can't mmap aio tmp buffer\n"); pr_err("Can't mmap aio tmp buffer\n");
return -1; return -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment