]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
imgact_elf: do not relock the text vnode if possible.
authorkib <kib@FreeBSD.org>
Sun, 5 May 2019 11:04:01 +0000 (11:04 +0000)
committerkib <kib@FreeBSD.org>
Sun, 5 May 2019 11:04:01 +0000 (11:04 +0000)
commite3b87f7a323ce8b266dd065b8972d7f8f9d8bf6f
tree2e050255b6438f3ab7963c027087d0edbfe72cac
parent0d62ce2428971dd79302202a32ede0d2f1dc44ec
imgact_elf: do not relock the text vnode if possible.

We unlock the vnode around malloc(M_WAITOK), to make it possible for
pagedaemon to flush vnode pages for us.  Instead of doing it
unconditionally, first try M_NOWAIT allocation, which typically
succeed.  Only on failure, unlock the vnode and retry with M_WAITOK.

Reviewed by: markj, trasz
Tested by: mjg, pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D19923
sys/kern/imgact_elf.c