[CRIU] [PATCH 09/10] uffd: Slightly tune up the pstree_items mgmt in ud_open
Pavel Emelyanov
xemul at virtuozzo.com
Fri Nov 11 21:26:05 PST 2016
The rsti() never fails :) Also initializing a variable with
a function call is ... not very welcome in CRIU.
Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
criu/uffd.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/criu/uffd.c b/criu/uffd.c
index 25e13ab..1393a70 100644
--- a/criu/uffd.c
+++ b/criu/uffd.c
@@ -575,15 +575,13 @@ static int find_vmas(struct lazy_pages_info *lpi)
int vn = 0;
struct rst_info *ri;
struct uffd_pages_struct *uffd_pages;
- struct pstree_item *item = pstree_item_by_virt(lpi->pid);
-
- BUG_ON(!item);
-
+ struct pstree_item *item;
+
vm_area_list_init(&vmas);
+ item = pstree_item_by_virt(lpi->pid);
+ BUG_ON(!item);
ri = rsti(item);
- if (!ri)
- return -1;
img = open_image(CR_FD_MM, O_RSTR, lpi->pid);
if (!img)
--
2.5.0
More information about the CRIU
mailing list