Commit 69ac4cef authored by Kinsbursky Stanislav's avatar Kinsbursky Stanislav Committed by Cyrill Gorcunov

restorer: make it 2 lines shorter

Signed-off-by: 's avatarStanislav Kinsbursky <skinsbursky@openvz.org>
Acked-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent c1aad883
...@@ -303,10 +303,8 @@ static u64 restore_mapping(const struct vma_entry *vma_entry) ...@@ -303,10 +303,8 @@ static u64 restore_mapping(const struct vma_entry *vma_entry)
* MAP_ANONYMOUS should be eliminated so fd would * MAP_ANONYMOUS should be eliminated so fd would
* be taken into account by a kernel. * be taken into account by a kernel.
*/ */
if (vma_entry_is(vma_entry, VMA_ANON_SHARED)) { if (vma_entry_is(vma_entry, VMA_ANON_SHARED) && (vma_entry->fd != -1UL))
if (vma_entry->fd != -1UL) flags &= ~MAP_ANONYMOUS;
flags &= ~MAP_ANONYMOUS;
}
/* A mapping of file with MAP_SHARED is up to date */ /* A mapping of file with MAP_SHARED is up to date */
if (vma_entry->fd == -1 || !(vma_entry->flags & MAP_SHARED)) if (vma_entry->fd == -1 || !(vma_entry->flags & MAP_SHARED))
......
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