]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
Correctly print out error from io_setup()
authorKent Overstreet <kent.overstreet@gmail.com>
Sat, 9 Oct 2021 20:20:28 +0000 (16:20 -0400)
committerKent Overstreet <kent.overstreet@gmail.com>
Sat, 9 Oct 2021 20:20:28 +0000 (16:20 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
linux/blkdev.c

index 97c9ff4c7192e543ac5706cbd7dd6a23691cf055..898fd53ad4fd6d4e3185120516c1151ba2adf6c1 100644 (file)
@@ -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));