diff options
author | Matthew Macy <[email protected]> | 2019-11-30 15:45:07 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-11-30 15:45:06 -0800 |
commit | 758699b6f1d37e75f10b40e3ebafeaa231d88acd (patch) | |
tree | cbadf956cb3ea2b075de4a47226936d1d5983f27 | |
parent | 101f9b1771a638947697e46f3acc16addefdf9f5 (diff) |
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 <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Matt Macy <[email protected]>
Closes #9643
-rw-r--r-- | module/nvpair/nvpair.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/module/nvpair/nvpair.c b/module/nvpair/nvpair.c index dd8a9420d..6c6a58e85 100644 --- a/module/nvpair/nvpair.c +++ b/module/nvpair/nvpair.c @@ -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); |