From: Roel Kluin <roel.kluin@gmail.com>
To: jens.axboe@oracle.com
Cc: LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] bio: sizeof pointer instead of size of the pointed-to type?
Date: Wed, 15 Jul 2009 16:00:46 +0200 [thread overview]
Message-ID: <4A5DE10E.7010005@gmail.com> (raw)
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;
next reply other threads:[~2009-07-15 13:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-15 14:00 Roel Kluin [this message]
2009-07-15 14:18 ` [PATCH] bio: sizeof pointer instead of size of the pointed-to type? Cyrill Gorcunov
2009-07-15 17:49 ` Jeff Moyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A5DE10E.7010005@gmail.com \
--to=roel.kluin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.