From: Oleg Nesterov Date: Thu, 9 Oct 2014 22:25:30 +0000 (-0700) Subject: fs/proc/task_mmu.c: cleanup the "tail_vma" horror in m_next() X-Git-Tag: fixes-against-v3.18-rc2~137^2~135 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23d54837e4f3a44ad4514d5eae8245c2250217ff;p=pandora-kernel.git fs/proc/task_mmu.c: cleanup the "tail_vma" horror in m_next() 1. Kill the first "vma != NULL" check. Firstly this is not possible, m_next() won't be called if ->start() or the previous ->next() returns NULL. And if it was possible the 2nd "vma != tail_vma" check is buggy, we should not wrongly return ->tail_vma. 2. Make this function readable. The logic is very simple, we should return check "vma != tail" once and return "vm_next || tail_vma". Signed-off-by: Oleg Nesterov Acked-by: Kirill A. Shutemov Acked-by: Cyrill Gorcunov Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed