Re: [PATCH liburing v2] test that unregister_files processes task work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/8/22 4:53 PM, Dylan Yudaken wrote:
+	ret = io_uring_register_files(&ring, &fds[0], 2);
+
+	sqe = io_uring_get_sqe(&ring);
+	io_uring_prep_read(sqe, 0, &buff, 1, 0);
+	sqe->flags |= IOSQE_FIXED_FILE;
+	ret = io_uring_submit(&ring);
+	if (ret != 1) {
+		fprintf(stderr, "bad submit\n");
+		return 1;
+	}

This assignment is meaningless:

   ret = io_uring_register_files().

It's overwritten by ret = io_uring_submit() anyway. I suppose we
should have an error handler right after register_files().

--
Ammar Faizi



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux