Patch "lightnvm: pblk: use right flag for GC allocation" has been added to the 4.14-stable tree
This is a note to let you know that I've just added the patch titled
lightnvm: pblk: use right flag for GC allocation
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
lightnvm-pblk-use-right-flag-for-gc-allocation.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Dec 18 13:29:00 CET 2017
From: Javier Gonz�lez <[email protected]>
Date: Fri, 13 Oct 2017 14:46:02 +0200
Subject: lightnvm: pblk: use right flag for GC allocation
From: Javier Gonz�lez <[email protected]>
[ Upstream commit 7d327a9ed6c4dca341ebf99012e0a6b80a3050e6 ]
The data buffer for the GC path allocates virtual memory through vmalloc. When this change was introduced, a flag signaling kmalloc'ed memory was wrongly introduced. Use the right flag when creating a bio from this buffer.
--- drivers/lightnvm/pblk-read.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/lightnvm/pblk-read.c +5 -2
@@ -499,7 +499,7 @@ int pblk_submit_read_gc(struct pblk *pbl data_len = (*secs_to_gc) * geo->sec_size; bio =pblk_bio_map_addr (pblk, data, *secs_to_gc, data_len, -PBLK_KMALLOC_META ,GFP_KERNEL ); +PBLK_VMALLOC_META ,GFP_KERNEL );if (IS_ERR (bio)) {pr_err ("pblk: could not allocate GC bio (%lu)\n" ,PTR_ERR (bio)); goto err_free_dma;
@@ -519,7 +519,7 @@ int pblk_submit_read_gc(struct pblk *pblif (ret) {bio_endio (bio);pr_err ("pblk: GC read request failed\n" ); - goto err_free_dma; + goto err_free_bio; } if (!wait_for_completion_io_timeout(&wait,
@@ -541,10 +541,13 @@ int pblk_submit_read_gc(struct pblk *pblatomic_long_sub (*secs_to_gc, &pblk->inflight_reads);#endif +bio_put (bio); out:nvm_dev_dma_free (dev->parent, rqd.meta_list, rqd.dma_meta_list);return NVM_IO_OK ; +err_free_bio: +bio_put (bio); err_free_dma:nvm_dev_dma_free (dev->parent, rqd.meta_list, rqd.dma_meta_list);return NVM_IO_ERR ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/lightnvm-pblk-fix-min-size-for-page-mempool.patch queue-4.14/lightnvm-pblk-use-right-flag-for-gc-allocation.patch queue-4.14/lightnvm-pblk-protect-line-bitmap-while-submitting-meta-io.patch queue-4.14/lightnvm-pblk-initialize-debug-stat-counter.patch