aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/dm-snap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index 6c96db26b87c..4ceedd4f22af 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -9,6 +9,7 @@
9#include <linux/blkdev.h> 9#include <linux/blkdev.h>
10#include <linux/ctype.h> 10#include <linux/ctype.h>
11#include <linux/device-mapper.h> 11#include <linux/device-mapper.h>
12#include <linux/delay.h>
12#include <linux/fs.h> 13#include <linux/fs.h>
13#include <linux/init.h> 14#include <linux/init.h>
14#include <linux/kdev_t.h> 15#include <linux/kdev_t.h>
@@ -735,7 +736,7 @@ static void snapshot_dtr(struct dm_target *ti)
735 unregister_snapshot(s); 736 unregister_snapshot(s);
736 737
737 while (atomic_read(&s->pending_exceptions_count)) 738 while (atomic_read(&s->pending_exceptions_count))
738 yield(); 739 msleep(1);
739 /* 740 /*
740 * Ensure instructions in mempool_destroy aren't reordered 741 * Ensure instructions in mempool_destroy aren't reordered
741 * before atomic_read. 742 * before atomic_read.
@@ -888,10 +889,10 @@ static void pending_complete(struct dm_snap_pending_exception *pe, int success)
888 889
889 /* 890 /*
890 * Check for conflicting reads. This is extremely improbable, 891 * Check for conflicting reads. This is extremely improbable,
891 * so yield() is sufficient and there is no need for a wait queue. 892 * so msleep(1) is sufficient and there is no need for a wait queue.
892 */ 893 */
893 while (__chunk_is_tracked(s, pe->e.old_chunk)) 894 while (__chunk_is_tracked(s, pe->e.old_chunk))
894 yield(); 895 msleep(1);
895 896
896 /* 897 /*
897 * Add a proper exception, and remove the 898 * Add a proper exception, and remove the