Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Device-mapper Development (http://www.linux-archive.org/device-mapper-development/)
-   -   dm-kcopyd: Correctly free requests (http://www.linux-archive.org/device-mapper-development/568494-dm-kcopyd-correctly-free-requests.html)

Bastian Blank 08-26-2011 10:15 AM

dm-kcopyd: Correctly free requests
 
kcopyd only frees the requests if the master job information is set up
correctly, but it was not in the recently added path. This leads to many
unfreed slabs during snapshot usage.

Signed-off-by: Bastian Blank <waldi@debian.org>
Tested-by: Andreas Barth <aba@not.so.argh.org>

diff --git a/drivers/md/dm-kcopyd.c b/drivers/md/dm-kcopyd.c
index f821470..32ac708 100644
--- a/drivers/md/dm-kcopyd.c
+++ b/drivers/md/dm-kcopyd.c
@@ -628,6 +628,7 @@ void *dm_kcopyd_prepare_callback(struct dm_kcopyd_client *kc,
job->kc = kc;
job->fn = fn;
job->context = context;
+ job->master_job = job;

atomic_inc(&kc->nr_jobs);

--
Landru! Guide us!
-- A Beta 3-oid, "The Return of the Archons", stardate 3157.4

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


All times are GMT. The time now is 08:21 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.