]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/md/dm-snap.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[linux-2.6-omap-h63xx.git] / drivers / md / dm-snap.c
index 83ddbfe6b8a415ca492c2db7b4701c1492a2a623..cee16fadd9ee70379449ce995ac4043d1ff86e5f 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
+#include <linux/log2.h>
 
 #include "dm-snap.h"
 #include "dm-bio-list.h"
@@ -415,7 +416,7 @@ static int set_chunk_size(struct dm_snapshot *s, const char *chunk_size_arg,
        chunk_size = round_up(chunk_size, PAGE_SIZE >> 9);
 
        /* Check chunk_size is a power of 2 */
-       if (chunk_size & (chunk_size - 1)) {
+       if (!is_power_of_2(chunk_size)) {
                *error = "Chunk size is not a power of 2";
                return -EINVAL;
        }
@@ -636,7 +637,7 @@ static void error_bios(struct bio *bio)
        while (bio) {
                n = bio->bi_next;
                bio->bi_next = NULL;
-               bio_io_error(bio, bio->bi_size);
+               bio_io_error(bio);
                bio = n;
        }
 }