Just use normal open coded bit operations instead, they need not be atomic.
Showing the changes to include/linux/blkdev.h (1 of 2 files). Show all
Unified · Split
| @@ -870,8 +870,8 @@ void kblockd_flush_work(struct work_struct *work); · 869 unmodified lines | ||
| 870 | 870 | |
| 871 | 871 | #if defined(CONFIG_BLK_DEV_INTEGRITY) |
| 872 | 872 | |
| 873 | −#define INTEGRITY_FLAG_READ 1 /* verify data integrity on read */ | |
| 874 | −#define INTEGRITY_FLAG_WRITE 2 /* generate data integrity on write */ | |
| 873 | +#define INTEGRITY_FLAG_READ 2 /* verify data integrity on read */ | |
| 874 | +#define INTEGRITY_FLAG_WRITE 4 /* generate data integrity on write */ | |
| 875 | 875 | |
| 876 | 876 | struct blk_integrity_exchg { |
| 877 | 877 | void *prot_buf; |
| @@ -940,11 +940,11 @@ static inline int bdev_integrity_enabled(struct block_device *bdev, int rw) · 62 unmodified lines | ||
| 940 | 940 | return 0; |
| 941 | 941 | |
| 942 | 942 | if (rw == READ && bi->verify_fn != NULL && |
| 943 | − test_bit(INTEGRITY_FLAG_READ, &bi->flags)) | |
| 943 | + (bi->flags & INTEGRITY_FLAG_READ)) | |
| 944 | 944 | return 1; |
| 945 | 945 | |
| 946 | 946 | if (rw == WRITE && bi->generate_fn != NULL && |
| 947 | − test_bit(INTEGRITY_FLAG_WRITE, &bi->flags)) | |
| 947 | + (bi->flags & INTEGRITY_FLAG_WRITE)) | |
| 948 | 948 | return 1; |
| 949 | 949 | |
| 950 | 950 | return 0; |