Skip to content

Commit

Permalink
dm: add missing memory barrier to dm_suspend
Browse files Browse the repository at this point in the history
Add memory barrier to fix atomic_read of pending value.

Signed-off-by: Milan Broz <[email protected]>
Signed-off-by: Alasdair G Kergon <[email protected]>
  • Loading branch information
Milan Broz authored and kergon committed Feb 8, 2008
1 parent df92207 commit 7e5c1e8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1410,6 +1410,7 @@ int dm_suspend(struct mapped_device *md, unsigned suspend_flags)
while (1) {
set_current_state(TASK_INTERRUPTIBLE);

smp_mb();
if (!atomic_read(&md->pending) || signal_pending(current))
break;

Expand Down

0 comments on commit 7e5c1e8

Please sign in to comment.