Commit 1293fb0f authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

restore: Make should_restore_page being bool

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
parent 4727c739
......@@ -685,16 +685,20 @@ static int fixup_vma_fds(int pid, int fd)
}
}
static inline int should_restore_page(int pid, unsigned long vaddr)
static inline bool should_restore_page(int pid, unsigned long va)
{
struct shmem_info *si;
unsigned long id;
unsigned long shmid;
id = find_shmem_id(vaddr);
if (id == 0)
return 1;
/*
* If this is not a shmem virtual address
* we should restore such page.
*/
shmid = find_shmem_id(va);
if (!shmid)
return true;
si = find_shmem(vaddr, id);
si = find_shmem(va, shmid);
return si->pid == pid;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment