[PATCH] mm: remove might_sleep() in __remove_vm_area()

From: Roman Gushchin
Date: Wed Apr 17 2019 - 18:55:49 EST


__remove_vm_area() has a redundant might_sleep() call, which isn't
really required, because the only place it can sleep is vfree()
and it already contains might_sleep_if(!in_interrupt()).

Suggested-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Roman Gushchin <guro@xxxxxx>
---
mm/vmalloc.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 69a5673c4cd3..4a91acce4b5f 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -2079,8 +2079,6 @@ static struct vm_struct *__remove_vm_area(struct vmap=
_area *va)
{
struct vm_struct *vm =3D va->vm;
=20
- might_sleep();
-
spin_lock(&vmap_area_lock);
va->vm =3D NULL;
va->flags &=3D ~VM_VM_AREA;
--=20
2.20.1