From 2b8693c0617e972fc0b2fd1ebf8de97e15b656c3 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Mon, 12 Feb 2007 00:55:32 -0800 Subject: [PATCH] mark struct file_operations const 3 Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- block/blktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/blktrace.c') diff --git a/block/blktrace.c b/block/blktrace.c index d36b32ed22f..3f0e7c37c05 100644 --- a/block/blktrace.c +++ b/block/blktrace.c @@ -264,7 +264,7 @@ static ssize_t blk_dropped_read(struct file *filp, char __user *buffer, return simple_read_from_buffer(buffer, count, ppos, buf, strlen(buf)); } -static struct file_operations blk_dropped_fops = { +static const struct file_operations blk_dropped_fops = { .owner = THIS_MODULE, .open = blk_dropped_open, .read = blk_dropped_read, -- cgit v1.2.3