aboutsummaryrefslogtreecommitdiffstats
path: root/io_uring/filetable.h
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2022-10-16 21:30:49 +0100
committerJens Axboe <axboe@kernel.dk>2022-10-16 17:07:53 -0600
commit4d5059512d283dab7372d282c2fbd43c7f5a2456 (patch)
tree384732a62cb297aee6e4f9272350bb1ac777eee2 /io_uring/filetable.h
parent38eddb2c75fb99b9cd78445094ca0e1bda08d102 (diff)
downloadlinux-4d5059512d283dab7372d282c2fbd43c7f5a2456.tar.gz
io_uring: kill hot path fixed file bitmap debug checks
We test file_table.bitmap in io_file_get_fixed() to check invariants, don't do it, it's expensive and was showing up in profiles. No reports of this triggering has come in. Move the check to the file clear instead, which will still catch any wrong usage. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/cf77f2ded68d2e5b2bc7355784d969837d48e023.1665891182.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/filetable.h')
-rw-r--r--io_uring/filetable.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/io_uring/filetable.h b/io_uring/filetable.h
index 19d2aed66c72e..351111ff88827 100644
--- a/io_uring/filetable.h
+++ b/io_uring/filetable.h
@@ -25,6 +25,7 @@ unsigned int io_file_get_flags(struct file *file);
static inline void io_file_bitmap_clear(struct io_file_table *table, int bit)
{
+ WARN_ON_ONCE(!test_bit(bit, table->bitmap));
__clear_bit(bit, table->bitmap);
table->alloc_hint = bit;
}