public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bio: sizeof pointer instead of size of the pointed-to type?
@ 2009-07-15 14:00 Roel Kluin
  2009-07-15 14:18 ` Cyrill Gorcunov
  2009-07-15 17:49 ` Jeff Moyer
  0 siblings, 2 replies; 3+ messages in thread
From: Roel Kluin @ 2009-07-15 14:00 UTC (permalink / raw)
  To: jens.axboe; +Cc: LKML, Andrew Morton

Do not take the size of a pointer to determine the size of the pointed-to type

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
This is not yet tested. Is it correct?

diff --git a/fs/bio.c b/fs/bio.c
index 7673800..e65c35d 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -96,7 +96,7 @@ static struct kmem_cache *bio_find_or_create_slab(unsigned int extra_size)
 	if (bio_slab_nr == bio_slab_max && entry == -1) {
 		bio_slab_max <<= 1;
 		bio_slabs = krealloc(bio_slabs,
-				     bio_slab_max * sizeof(struct bio_slab),
+				     bio_slab_max * sizeof(struct bio_slab *),
 				     GFP_KERNEL);
 		if (!bio_slabs)
 			goto out_unlock;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-15 17:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-15 14:00 [PATCH] bio: sizeof pointer instead of size of the pointed-to type? Roel Kluin
2009-07-15 14:18 ` Cyrill Gorcunov
2009-07-15 17:49 ` Jeff Moyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox