From: Milan Broz <[email-masked]>

Add memory barrier to fix atomic_read of pending value.

Signed-off-by: Milan Broz <[email-masked]>
Signed-off-by: Alasdair G Kergon <[email-masked]>
---
 drivers/md/dm.c |    1 +
 1 files changed, 1 insertion(+)

Index: linux-2.6.24/drivers/md/dm.c
===================================================================
--- linux-2.6.24.orig/drivers/md/dm.c	2008-02-07 13:46:56.000000000 +0000
+++ linux-2.6.24/drivers/md/dm.c	2008-02-07 13:48:01.000000000 +0000
@@ -1410,6 +1410,7 @@ int dm_suspend(struct mapped_device *md,
 	while (1) {
 		set_current_state(TASK_INTERRUPTIBLE);
 
+		smp_mb();
 		if (!atomic_read(&md->pending) || signal_pending(current))
 			break;