[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190912063126.13250-1-richardw.yang@linux.intel.com>
Date: Thu, 12 Sep 2019 14:31:26 +0800
From: Wei Yang <richardw.yang@...ux.intel.com>
To: akpm@...ux-foundation.org, vbabka@...e.cz,
yang.shi@...ux.alibaba.com
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Wei Yang <richardw.yang@...ux.intel.com>
Subject: [PATCH] mm/mmap.c: remove a never trigger warning in __vma_adjust()
The upper level of "if" makes sure (end >= next->vm_end), which means
there are only two possibilities:
1) end == next->vm_end
2) end > next->vm_end
remove_next is assigned to be (1 + end > next->vm_end). This means if
remove_next is 1, end must equal to next->vm_end.
The VM_WARN_ON will never trigger.
Signed-off-by: Wei Yang <richardw.yang@...ux.intel.com>
---
mm/mmap.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/mmap.c b/mm/mmap.c
index 907939690a30..18ef68f00f51 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -738,8 +738,6 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start,
remove_next = 1 + (end > next->vm_end);
VM_WARN_ON(remove_next == 2 &&
end != next->vm_next->vm_end);
- VM_WARN_ON(remove_next == 1 &&
- end != next->vm_end);
/* trim end to next, for case 6 first pass */
end = next->vm_end;
}
--
2.17.1
Powered by blists - more mailing lists