diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-27 14:21:19 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-27 14:21:19 -0800 |
commit | 9c8ff4f4dac189e4111238d54c2b12e7837f4818 (patch) | |
tree | 70bd1b82721b56e17ebdbb11b618c47864146061 /drivers | |
parent | 86e67a07d4dc8cd40454698f2abb972fced06910 (diff) | |
parent | 645a8d94629fd812a220d54876339a1ddafd9bc2 (diff) | |
download | linux-9c8ff4f4dac189e4111238d54c2b12e7837f4818.tar.bz2 |
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
scatterlist: add more safeguards
Revert "ll_rw_blk: temporarily enable max_segments tweaking"
mmc: Add missing sg_init_table() call
block: Fix memory leak in alloc_disk_node()
alpha: fix sg_page breakage
blktrace: Make sure BLKTRACETEARDOWN does the full cleanup.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/card/queue.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index 1b9c9b6da5b7..30cd13b13ac3 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c @@ -180,12 +180,13 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock blk_queue_max_hw_segments(mq->queue, host->max_hw_segs); blk_queue_max_segment_size(mq->queue, host->max_seg_size); - mq->sg = kzalloc(sizeof(struct scatterlist) * + mq->sg = kmalloc(sizeof(struct scatterlist) * host->max_phys_segs, GFP_KERNEL); if (!mq->sg) { ret = -ENOMEM; goto cleanup_queue; } + sg_init_table(mq->sg, host->max_phys_segs); } init_MUTEX(&mq->thread_sem); |