mem: Do not hide error from add_shmem_area

Submitted by Pavel Emelianov on Sept. 2, 2016, 2:07 p.m.

Details

Message ID 57C987A3.8020307@virtuozzo.com
State Rejected
Series "mem: Do not hide error from add_shmem_area"
Headers show

Commit Message

Pavel Emelianov Sept. 2, 2016, 2:07 p.m.
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
---
 criu/mem.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/mem.c b/criu/mem.c
index a94a378..63acec3 100644
--- a/criu/mem.c
+++ b/criu/mem.c
@@ -365,14 +365,14 @@  again:
 				BUG_ON(delayed_dump);
 
 				ret = dump_pages(pp, ctl, args, &xfer, false);
-				if (ret)
-					goto out_xfer;
-				page_pipe_reinit(pp);
-				goto again;
+				if (!ret) {
+					page_pipe_reinit(pp);
+					goto again;
+				}
 			}
-			if (ret < 0)
-				goto out_xfer;
 		}
+		if (ret < 0)
+			goto out_xfer;
 	}
 
 	if (lazy)