From c9d13f5fc748a02cb5917a798f065681007342b9 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Tue, 8 Sep 2015 15:04:08 -0700 Subject: [PATCH] mm/mmap.c:insert_vm_struct(): check for failure before setting values There's no point in initializing vma->vm_pgoff if the insertion attempt will be failing anyway. Run the checks before performing the initialization. Signed-off-by: Chen Gang Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed