diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/aoe/aoechr.c | 3 | ||||
-rw-r--r-- | drivers/block/nbd.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/block/aoe/aoechr.c b/drivers/block/aoe/aoechr.c index 42e67ad6bd20..ab41be625a53 100644 --- a/drivers/block/aoe/aoechr.c +++ b/drivers/block/aoe/aoechr.c | |||
@@ -139,13 +139,12 @@ bail: spin_unlock_irqrestore(&emsgs_lock, flags); | |||
139 | return; | 139 | return; |
140 | } | 140 | } |
141 | 141 | ||
142 | mp = kmalloc(n, GFP_ATOMIC); | 142 | mp = kmemdup(msg, n, GFP_ATOMIC); |
143 | if (mp == NULL) { | 143 | if (mp == NULL) { |
144 | printk(KERN_ERR "aoe: allocation failure, len=%ld\n", n); | 144 | printk(KERN_ERR "aoe: allocation failure, len=%ld\n", n); |
145 | goto bail; | 145 | goto bail; |
146 | } | 146 | } |
147 | 147 | ||
148 | memcpy(mp, msg, n); | ||
149 | em->msg = mp; | 148 | em->msg = mp; |
150 | em->flags |= EMFL_VALID; | 149 | em->flags |= EMFL_VALID; |
151 | em->len = n; | 150 | em->len = n; |
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 7fecc784be01..037288e7874d 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c | |||
@@ -856,6 +856,8 @@ static int __init nbd_init(void) | |||
856 | disk->queue->limits.discard_granularity = 512; | 856 | disk->queue->limits.discard_granularity = 512; |
857 | disk->queue->limits.max_discard_sectors = UINT_MAX; | 857 | disk->queue->limits.max_discard_sectors = UINT_MAX; |
858 | disk->queue->limits.discard_zeroes_data = 0; | 858 | disk->queue->limits.discard_zeroes_data = 0; |
859 | blk_queue_max_hw_sectors(disk->queue, 65536); | ||
860 | disk->queue->limits.max_sectors = 256; | ||
859 | } | 861 | } |
860 | 862 | ||
861 | if (register_blkdev(NBD_MAJOR, "nbd")) { | 863 | if (register_blkdev(NBD_MAJOR, "nbd")) { |