]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: Fix return value from alloc_fixed_file_ref_node
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 6 Jan 2021 16:09:26 +0000 (16:09 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 6 Jan 2021 16:19:49 +0000 (09:19 -0700)
commit885f4c8dce261ad39170fff1c3497719133c8173
treed1da5acf761afe00c84758e810d284c7493e77bf
parent84a6d8a7da92792211b80953acf9cc7b8bb2fc74
io_uring: Fix return value from alloc_fixed_file_ref_node

alloc_fixed_file_ref_node() currently returns an ERR_PTR on failure.
io_sqe_files_unregister() expects it to return NULL and since it can only
return -ENOMEM, it makes more sense to change alloc_fixed_file_ref_node()
to behave that way.

Fixes: ff26b8748ea4 ("io_uring: fix io_sqe_files_unregister() hangs")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c