io_uring: account locked memory before potential error case
authorJens Axboe <axboe@kernel.dk>
Wed, 5 Aug 2020 19:00:44 +0000 (13:00 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 6 Aug 2020 13:39:29 +0000 (07:39 -0600)
commitf74441e6311a28f0ee89b9c8e296a33730f812fc
tree846cf9599ec0879766b0c5578f4344ca7b8568c3
parentbd74048108c179cea0ff52979506164c80f29da7
io_uring: account locked memory before potential error case

The tear down path will always unaccount the memory, so ensure that we
have accounted it before hitting any of them.

Reported-by: Tomáš Chaloupka <chalucha@gmail.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c