Skip to content

Commit

Permalink
Revert "io_uring: mark io_uring_fops/io_op_defs as __read_mostly"
Browse files Browse the repository at this point in the history
This reverts commit 738277a.

This change didn't make a lot of sense, and as Linus reports, it actually
fails on clang:

   /tmp/io_uring-dd40c4.s:26476: Warning: ignoring changed section
   attributes for .data..read_mostly

The arrays are already marked const so, by definition, they are not
just read-mostly, they are read-only.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Jens Axboe committed Oct 17, 2020
1 parent 216578e commit 0918682
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/io_uring.c
Original file line number Diff line number Diff line change
@@ -760,7 +760,7 @@ struct io_op_def {
unsigned short async_size;
};

static const struct io_op_def io_op_defs[] __read_mostly = {
static const struct io_op_def io_op_defs[] = {
[IORING_OP_NOP] = {},
[IORING_OP_READV] = {
.needs_mm = 1,
@@ -983,7 +983,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 __read_mostly;
static const struct file_operations io_uring_fops;

struct sock *io_uring_get_socket(struct file *file)
{

0 comments on commit 0918682

Please sign in to comment.