Thread (16 messages) 16 messages, 4 authors, 2016-09-28
STALE3559d

[PATCH 2/2] mm: vma_adjust: remove superfluous check for next not NULL

From: Andrea Arcangeli <hidden>
Date: 2016-09-19 18:25:17
Subsystem: memory management, memory mapping, the rest · Maintainers: Andrew Morton, Liam R. Howlett, Lorenzo Stoakes, Linus Torvalds

If next would be NULL we couldn't reach such code path.

Signed-off-by: Andrea Arcangeli <redacted>
---
 mm/mmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/mmap.c b/mm/mmap.c
index eda3f07..4f512ca 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -702,7 +702,7 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start,
 			 * If next doesn't have anon_vma, import from vma after
 			 * next, if the vma overlaps with it.
 			 */
-			if (remove_next == 2 && next && !next->anon_vma)
+			if (remove_next == 2 && !next->anon_vma)
 				exporter = next->vm_next;
 
 		} else if (end > next->vm_start) {

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help