From: louchaoquan louchaoquan1@huawei.com
Signed-off-by: Louchaoquan louchaoquan1@huawei.com --- kernel/power/swap.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/kernel/power/swap.c b/kernel/power/swap.c index d7f6c1a288d3..ac20064c9e52 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -649,10 +649,12 @@ static int lzo_compress_threadfn(void *data) break; } atomic_set(&d->ready, 0); + mb();
d->ret = lzo1x_1_compress(d->unc, d->unc_len, d->cmp + LZO_HEADER, &d->cmp_len, d->wrk); + mb(); atomic_set(&d->stop, 1); wake_up(&d->done); } @@ -790,6 +792,7 @@ static int save_image_lzo(struct swap_map_handle *handle, break;
data[thr].unc_len = off; + mb();
atomic_set(&data[thr].ready, 1); wake_up(&data[thr].go); @@ -806,6 +809,7 @@ static int save_image_lzo(struct swap_map_handle *handle, wait_event(data[thr].done, atomic_read(&data[thr].stop)); atomic_set(&data[thr].stop, 0); + mb();
ret = data[thr].ret;