[CRIU] [crtools-bot for Kinsbursky Stanislav ] restorer: make it 2 lines shorter

Cyrill Gorcunov gorcunov at openvz.org
Mon Feb 20 05:34:23 EST 2012


The commit is pushed to "master" and will appear on git://github.com/cyrillos/crtools.git
------>
commit 69ac4cef83ea26fa326083ed98ad1229e357bcae
Author: Kinsbursky Stanislav <skinsbursky at openvz.org>
Date:   Fri Feb 17 15:43:17 2012 +0300

    restorer: make it 2 lines shorter
    
    Signed-off-by: Stanislav Kinsbursky <skinsbursky at openvz.org>
    Acked-by: Pavel Emelyanov <xemul at parallels.com>
    Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 restorer.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/restorer.c b/restorer.c
index d62d144..3761b33 100644
--- a/restorer.c
+++ b/restorer.c
@@ -303,10 +303,8 @@ static u64 restore_mapping(const struct vma_entry *vma_entry)
 	 * MAP_ANONYMOUS should be eliminated so fd would
 	 * be taken into account by a kernel.
 	 */
-	if (vma_entry_is(vma_entry, VMA_ANON_SHARED)) {
-		if (vma_entry->fd != -1UL)
-			flags &= ~MAP_ANONYMOUS;
-	}
+	if (vma_entry_is(vma_entry, VMA_ANON_SHARED) && (vma_entry->fd != -1UL))
+		flags &= ~MAP_ANONYMOUS;
 
 	/* A mapping of file with MAP_SHARED is up to date */
 	if (vma_entry->fd == -1 || !(vma_entry->flags & MAP_SHARED))


More information about the CRIU mailing list