summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-10-09 16:20:28 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2021-10-09 16:20:28 -0400
commit2225e9a372c778093299fc6eee7bf31b7de46eaf (patch)
treefb6415691183db7b16dc1935f374f61032971474 /linux
parent3f7b0b0832a61ccaf590f3503521eb7cf8f14f64 (diff)
Correctly print out error from io_setup()
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'linux')
-rw-r--r--linux/blkdev.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/linux/blkdev.c b/linux/blkdev.c
index 97c9ff4c..898fd53a 100644
--- a/linux/blkdev.c
+++ b/linux/blkdev.c
@@ -278,9 +278,10 @@ __attribute__((constructor(102)))
static void blkdev_init(void)
{
struct task_struct *p;
+ long err = io_setup(256, &aio_ctx);
- if (io_setup(256, &aio_ctx))
- die("io_setup() error: %m");
+ if (err)
+ die("io_setup() error: %s", strerror(-err));
p = kthread_run(aio_completion_thread, NULL, "aio_completion");
BUG_ON(IS_ERR(p));