Эх сурвалжийг харах

bsg: mark struct file_operations const

struct file_operations is generally const (to avoid false sharing and get compile time errors on accidental writing to this shared structure); bsg recently added one of these without the const keyword. Patch below marks it const....

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Arjan van de Ven 17 жил өмнө
parent
commit
7344be053a
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      block/bsg.c

+ 1 - 1
block/bsg.c

@@ -908,7 +908,7 @@ static long bsg_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 	}
 }
 
-static struct file_operations bsg_fops = {
+static const struct file_operations bsg_fops = {
 	.read		=	bsg_read,
 	.write		=	bsg_write,
 	.poll		=	bsg_poll,