diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2008-06-27 03:12:09 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-07-03 07:21:15 -0400 |
commit | b24498d477a14680fc3bb3ad884fa9fa76a2d237 (patch) | |
tree | 1ba2c9f24b3f22f45fa424ad904fb6dcc5d67790 /include/linux/blkdev.h | |
parent | 06a452e5b95eb669b7ad414ccf587dfc2d91b217 (diff) |
block: integrity flags can't use bit ops on unsigned short
Just use normal open coded bit operations instead, they need not be
atomic.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index a842b776d099..7ab8acad5b6e 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -870,8 +870,8 @@ void kblockd_flush_work(struct work_struct *work); | |||
870 | 870 | ||
871 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | 871 | #if defined(CONFIG_BLK_DEV_INTEGRITY) |
872 | 872 | ||
873 | #define INTEGRITY_FLAG_READ 1 /* verify data integrity on read */ | 873 | #define INTEGRITY_FLAG_READ 2 /* verify data integrity on read */ |
874 | #define INTEGRITY_FLAG_WRITE 2 /* generate data integrity on write */ | 874 | #define INTEGRITY_FLAG_WRITE 4 /* generate data integrity on write */ |
875 | 875 | ||
876 | struct blk_integrity_exchg { | 876 | struct blk_integrity_exchg { |
877 | void *prot_buf; | 877 | void *prot_buf; |
@@ -940,11 +940,11 @@ static inline int bdev_integrity_enabled(struct block_device *bdev, int rw) | |||
940 | return 0; | 940 | return 0; |
941 | 941 | ||
942 | if (rw == READ && bi->verify_fn != NULL && | 942 | if (rw == READ && bi->verify_fn != NULL && |
943 | test_bit(INTEGRITY_FLAG_READ, &bi->flags)) | 943 | (bi->flags & INTEGRITY_FLAG_READ)) |
944 | return 1; | 944 | return 1; |
945 | 945 | ||
946 | if (rw == WRITE && bi->generate_fn != NULL && | 946 | if (rw == WRITE && bi->generate_fn != NULL && |
947 | test_bit(INTEGRITY_FLAG_WRITE, &bi->flags)) | 947 | (bi->flags & INTEGRITY_FLAG_WRITE)) |
948 | return 1; | 948 | return 1; |
949 | 949 | ||
950 | return 0; | 950 | return 0; |