io_uring: mark io_uring_fops/io_op_defs as __read_mostly
authorJens Axboe <axboe@kernel.dk>
Thu, 3 Sep 2020 11:54:56 +0000 (05:54 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 1 Oct 2020 02:32:33 +0000 (20:32 -0600)
These structures are never written, move them appropriately.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c

index 546bc1fbf48218e4e19e86b5f9b6828501b176ab..a924ab1cf15bbf507f2e62da8d24ba03394092d9 100644 (file)
@@ -755,7 +755,7 @@ struct io_op_def {
        unsigned                needs_fsize : 1;
 };
 
-static const struct io_op_def io_op_defs[] = {
+static const struct io_op_def io_op_defs[] __read_mostly = {
        [IORING_OP_NOP] = {},
        [IORING_OP_READV] = {
                .async_ctx              = 1,
@@ -950,7 +950,7 @@ static int io_setup_async_rw(struct io_kiocb *req, const struct iovec *iovec,
 
 static struct kmem_cache *req_cachep;
 
-static const struct file_operations io_uring_fops;
+static const struct file_operations io_uring_fops __read_mostly;
 
 struct sock *io_uring_get_socket(struct file *file)
 {