summaryrefslogtreecommitdiffstats
path: root/block/blk-integrity.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2017-03-24 21:03:48 -0400
committerJens Axboe <axboe@fb.com>2017-03-24 22:34:39 -0400
commit869ab90f0ae0002ce6e9d3a5c75156ae8de48ffc (patch)
tree22ff97e02c266e84658d535d63107f84e67fc059 /block/blk-integrity.c
parent1be7d2073e83e2b5c632a65bfcd59a73ce92bf6d (diff)
block: constify struct blk_integrity_profile
blk_integrity_profile's are never modified, so mark them 'const' so that they are placed in .rodata and benefit from memory protection. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-integrity.c')
-rw-r--r--block/blk-integrity.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-integrity.c b/block/blk-integrity.c
index 9f0ff5ba4f84..b3622cb00fc2 100644
--- a/block/blk-integrity.c
+++ b/block/blk-integrity.c
@@ -389,7 +389,7 @@ static int blk_integrity_nop_fn(struct blk_integrity_iter *iter)
389 return 0; 389 return 0;
390} 390}
391 391
392static struct blk_integrity_profile nop_profile = { 392static const struct blk_integrity_profile nop_profile = {
393 .name = "nop", 393 .name = "nop",
394 .generate_fn = blk_integrity_nop_fn, 394 .generate_fn = blk_integrity_nop_fn,
395 .verify_fn = blk_integrity_nop_fn, 395 .verify_fn = blk_integrity_nop_fn,