]> git.baikalelectronics.ru Git - kernel.git/commit
md: remove suspicious size_of()
authorNeilBrown <neilb@suse.de>
Wed, 27 Jul 2011 21:56:24 +0000 (07:56 +1000)
committerNeilBrown <neilb@suse.de>
Wed, 27 Jul 2011 21:56:24 +0000 (07:56 +1000)
commitfbd1352908ef363fc6661e78464316aeb484ff8a
treebef24eab8604ef2275eb8f1b591ea52bd4b89194
parentbe9d95ab239e4f18731f3699be15065a7cd2063b
md: remove suspicious size_of()

When calling bioset_create we pass the size of the front_pad as
   sizeof(mddev)
which looks suspicious as mddev is a pointer and so it looks like a
common mistake where
   sizeof(*mddev)
was intended.
The size is actually correct as we want to store a pointer in the
front padding of the bios created by the bioset, so make the intent
more explicit by using
   sizeof(mddev_t *)

Reported-by: Zdenek Kabelac <zdenek.kabelac@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c