vfree: don't schedule free_work() if llist_add() returns false
authorOleg Nesterov <oleg@redhat.com>
Mon, 8 Jul 2013 23:00:08 +0000 (16:00 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Jul 2013 17:33:22 +0000 (10:33 -0700)
commit59d3132f8abdc18301898febf205d00db5f0458c
treef780fd6c6883edfbcdf2101e74941265d8e8a18b
parent345606d42971fc4ed164fbabac118708d51b8e0a
vfree: don't schedule free_work() if llist_add() returns false

vfree() only needs schedule_work(&p->wq) if p->list was empty, otherwise
vfree_deferred->wq is already pending or it is running and didn't do
llist_del_all() yet.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/vmalloc.c