]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: openclose: fix bug of closing wrong fixed file
authorHao Xu <howeyxu@tencent.com>
Sat, 11 Jun 2022 12:22:20 +0000 (20:22 +0800)
committerPavel Begunkov <asml.silence@gmail.com>
Mon, 13 Jun 2022 10:37:03 +0000 (11:37 +0100)
commit6681b1b2e136097694df933489232bbc4af3d20d
tree0c8c8ccf7f4af16da4852d7d17fba351f5184be6
parente9b4ed5c52df71f2dd523b4c07e20c560352a740
io_uring: openclose: fix bug of closing wrong fixed file

Don't update ret until fixed file is closed, otherwise the file slot
becomes the error code.

Fixes: 3c02192c8665 ("io_uring: let IORING_OP_FILES_UPDATE support choosing fixed file slots")
Signed-off-by: Hao Xu <howeyxu@tencent.com>
[pavel: 5.19 rebase]
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
fs/io_uring.c