io_uring: fix locked_free_list caches_free()
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 23 Feb 2021 22:17:20 +0000 (22:17 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 24 Feb 2021 02:18:54 +0000 (19:18 -0700)
commite5547d2c5eb363bfac7632ba789ca834fa829650
treec5c48ab77f57f37363acf586b97313bbcdc5e430
parent7c977a58dc83366e488c217fd88b1469d242bee5
io_uring: fix locked_free_list caches_free()

Don't forget to zero locked_free_nr, it's not a disaster but makes it
attempting to flush it with extra locking when there is nothing in the
list. Also, don't traverse a potentially long list freeing requests
under spinlock, splice the list and do it afterwards.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c