From: Oleg Nesterov Date: Fri, 4 Sep 2015 22:48:10 +0000 (-0700) Subject: mremap: don't do uneccesary checks if new_len == old_len X-Git-Tag: omap-for-v4.3/fixes-rc1~87^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d3916869798755968b3cd764ab21f2bb86ffff7;p=pandora-kernel.git mremap: don't do uneccesary checks if new_len == old_len The "new_len > old_len" branch in vma_to_resize() looks very confusing. It only covers the VM_DONTEXPAND/pgoff checks but everything below is equally unneeded if new_len == old_len. Change this code to return if "new_len == old_len", new_len < old_len is not possible, otherwise the code below is wrong anyway. Signed-off-by: Oleg Nesterov Acked-by: David Rientjes Cc: Benjamin LaHaise Cc: Hugh Dickins Cc: Jeff Moyer Cc: Kirill A. Shutemov Cc: Laurent Dufour Cc: Pavel Emelyanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed