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>
This commit is contained in:
@@ -159,11 +159,11 @@ struct badblocks;
|
||||
#if defined(CONFIG_BLK_DEV_INTEGRITY)
|
||||
|
||||
struct blk_integrity {
|
||||
struct blk_integrity_profile *profile;
|
||||
unsigned char flags;
|
||||
unsigned char tuple_size;
|
||||
unsigned char interval_exp;
|
||||
unsigned char tag_size;
|
||||
const struct blk_integrity_profile *profile;
|
||||
unsigned char flags;
|
||||
unsigned char tuple_size;
|
||||
unsigned char interval_exp;
|
||||
unsigned char tag_size;
|
||||
};
|
||||
|
||||
#endif /* CONFIG_BLK_DEV_INTEGRITY */
|
||||
|
@@ -34,9 +34,9 @@ struct t10_pi_tuple {
|
||||
};
|
||||
|
||||
|
||||
extern struct blk_integrity_profile t10_pi_type1_crc;
|
||||
extern struct blk_integrity_profile t10_pi_type1_ip;
|
||||
extern struct blk_integrity_profile t10_pi_type3_crc;
|
||||
extern struct blk_integrity_profile t10_pi_type3_ip;
|
||||
extern const struct blk_integrity_profile t10_pi_type1_crc;
|
||||
extern const struct blk_integrity_profile t10_pi_type1_ip;
|
||||
extern const struct blk_integrity_profile t10_pi_type3_crc;
|
||||
extern const struct blk_integrity_profile t10_pi_type3_ip;
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user