diff mbox

[2/3] kcopyd+snapshots race condition

Message ID Pine.LNX.4.64.0903181914120.25113@hs20-bc2-1.build.redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Alasdair Kergon
Headers show

Commit Message

Mikulas Patocka March 18, 2009, 11:14 p.m. UTC
Test for job->pages being zero. This will be needed for the next patch.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

---
 drivers/md/dm-kcopyd.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


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

Comments

Alasdair G Kergon April 6, 2009, 7:39 p.m. UTC | #1
On Wed, Mar 18, 2009 at 07:14:42PM -0400, Mikulas Patocka wrote:
> Test for job->pages being zero. This will be needed for the next patch.
 
Queued to linux-next (+stable).

Alasdair
diff mbox

Patch

Index: linux-2.6.29-rc8-devel/drivers/md/dm-kcopyd.c
===================================================================
--- linux-2.6.29-rc8-devel.orig/drivers/md/dm-kcopyd.c	2009-03-18 20:39:07.000000000 +0100
+++ linux-2.6.29-rc8-devel/drivers/md/dm-kcopyd.c	2009-03-18 20:39:19.000000000 +0100
@@ -297,7 +297,8 @@  static int run_complete_job(struct kcopy
 	dm_kcopyd_notify_fn fn = job->fn;
 	struct dm_kcopyd_client *kc = job->kc;
 
-	kcopyd_put_pages(kc, job->pages);
+	if (job->pages)
+		kcopyd_put_pages(kc, job->pages);
 	mempool_free(job, kc->job_pool);
 	fn(read_err, write_err, context);