Fixing incorrect page allocation in read-modify-write code path
authorkrishven <venkrish007@gmail.com>
Fri, 16 Dec 2016 23:50:37 +0000 (18:50 -0500)
committerkrishven <venkrish007@gmail.com>
Fri, 16 Dec 2016 23:50:37 +0000 (18:50 -0500)
Replacing sizeof(p) with sizeof(*p) in kmalloc()

drivers/md/dm-dedup-rw.c

index ba3f78275790e0ef82b4dbf9b99598d2d55ac1b1..7947f7989849b8d1db1af9f44b81500bcbea2ea1 100644 (file)
@@ -166,7 +166,7 @@ static struct bio *prepare_bio_with_pbn(struct dedup_config *dc,
        struct page_list *pl;
        struct bio *clone = NULL;
 
-       pl = kmalloc(sizeof(pl), GFP_NOIO);
+       pl = kmalloc(sizeof(*pl), GFP_NOIO);
        if (!pl)
                goto out;