diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2017-04-27 00:39:47 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2017-04-27 18:16:32 +0200 |
commit | 84ff1bcc2e25f1ddf5b350c4fa718ca01fdd88e9 (patch) | |
tree | e5b00f7ba4b76756e874e4bfded3ec35618bea8d /drivers/md | |
parent | dm integrity: use hex2bin instead of open-coded variant (diff) | |
download | linux-84ff1bcc2e25f1ddf5b350c4fa718ca01fdd88e9.tar.xz linux-84ff1bcc2e25f1ddf5b350c4fa718ca01fdd88e9.zip |
dm integrity: use previously calculated log2 of sectors_per_block
The log2 of sectors_per_block was already calculated, so we don't have
to use the ilog2 function.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-integrity.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index 023d3f8a51cc..c7f7c8d76576 100644 --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -14,7 +14,6 @@ #include <linux/rbtree.h> #include <linux/delay.h> #include <linux/random.h> -#include <linux/log2.h> #include <crypto/hash.h> #include <crypto/skcipher.h> #include <linux/async_tx.h> @@ -2369,7 +2368,7 @@ static void dm_integrity_set(struct dm_target *ti, struct dm_integrity_c *ic) bi.profile = &dm_integrity_profile; bi.tuple_size = ic->tag_size; bi.tag_size = bi.tuple_size; - bi.interval_exp = ilog2(ic->sectors_per_block << SECTOR_SHIFT); + bi.interval_exp = ic->sb->log2_sectors_per_block + SECTOR_SHIFT; blk_integrity_register(disk, &bi); blk_queue_max_integrity_segments(disk->queue, UINT_MAX); |