]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libnv: Allow use in non-sleepable contexts
authorKristof Provost <kp@FreeBSD.org>
Thu, 25 Mar 2021 12:59:14 +0000 (13:59 +0100)
committerKristof Provost <kp@FreeBSD.org>
Wed, 7 Apr 2021 13:54:10 +0000 (15:54 +0200)
commitab8d25880ebc9ddca1ae6af938680036349edf3f
treeac0daed5fe6713d7e5fa171461503c4399e74cde
parent5a5623397c73e46b206289d32d1d6b9de420da9c
libnv: Allow use in non-sleepable contexts

44c125c4cebc2fd87c6260b90eddae11201f5232 switched the nvlist allocations
to be M_WAITOK, but this precludes the use in non-sleepable contexts.
(E.g. with a nonsleepable lock held).

All callers for these allocation functions already cope with memory
alloation failures, so there's no reason to allow sleeping during
allocations.

Reviewed by: melifaro, oshogbo
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D29556
sys/contrib/libnv/nv_impl.h