summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-10-18 14:43:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-10-18 14:43:40 -0400
commit020b3023762fdf6cc816ed154e3b1f8eafaf0836 (patch)
treea45c77db6c2e6ad300125bf54943d9df16b87b6e /drivers
parent3e0cc09a3a2c40ec1ffb6b4e12da86e98feccb11 (diff)
parentffe51f0142a291a957eebb9687cafb15f2b3fc14 (diff)
downloadlinux-stable-020b3023762fdf6cc816ed154e3b1f8eafaf0836.tar.gz
linux-stable-020b3023762fdf6cc816ed154e3b1f8eafaf0836.tar.bz2
linux-stable-020b3023762fdf6cc816ed154e3b1f8eafaf0836.zip
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe: "Three small fixes: - A fix for skd, it was using kfree() to free a structure allocate with kmem_cache_alloc(). - Stable fix for nbd, fixing a regression using the normal ioctl based tools. - Fix for a previous fix in this series, that fixed up inconsistencies between buffered and direct IO" * 'for-linus' of git://git.kernel.dk/linux-block: fs: Avoid invalidation in interrupt context in dio_complete() nbd: don't set the device size until we're connected skd: Use kmem_cache_free
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/nbd.c2
-rw-r--r--drivers/block/skd_main.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 883dfebd3014..baebbdfd74d5 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -243,7 +243,6 @@ static void nbd_size_set(struct nbd_device *nbd, loff_t blocksize,
struct nbd_config *config = nbd->config;
config->blksize = blocksize;
config->bytesize = blocksize * nr_blocks;
- nbd_size_update(nbd);
}
static void nbd_complete_rq(struct request *req)
@@ -1094,6 +1093,7 @@ static int nbd_start_device(struct nbd_device *nbd)
args->index = i;
queue_work(recv_workqueue, &args->work);
}
+ nbd_size_update(nbd);
return error;
}
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 7cedb4295e9d..64d0fc17c174 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -2604,7 +2604,7 @@ static void *skd_alloc_dma(struct skd_device *skdev, struct kmem_cache *s,
return NULL;
*dma_handle = dma_map_single(dev, buf, s->size, dir);
if (dma_mapping_error(dev, *dma_handle)) {
- kfree(buf);
+ kmem_cache_free(s, buf);
buf = NULL;
}
return buf;