mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 10:01:01 +03:00
Restructure nvlist_nv_alloc to work on FreeBSD
KM_PUSHPAGE is an Illumosism - On FreeBSD it's aliased to the same malloc flag as KM_SLEEP. The compiler naturally rejects multiple case statements with the same value. This is effectively a no-op since all callers pass a specific KM_* flag. Reviewed-by: Jorgen Lundman <lundman@lundman.net> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #9643
This commit is contained in:
parent
101f9b1771
commit
758699b6f1
@ -558,10 +558,10 @@ nvlist_nv_alloc(int kmflag)
|
||||
switch (kmflag) {
|
||||
case KM_SLEEP:
|
||||
return (nv_alloc_sleep);
|
||||
case KM_PUSHPAGE:
|
||||
return (nv_alloc_pushpage);
|
||||
default:
|
||||
case KM_NOSLEEP:
|
||||
return (nv_alloc_nosleep);
|
||||
default:
|
||||
return (nv_alloc_pushpage);
|
||||
}
|
||||
#else
|
||||
return (nv_alloc_nosleep);
|
||||
|
Loading…
Reference in New Issue
Block a user