diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2018-09-17 23:31:37 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-09-19 11:06:09 +0200 |
commit | 72c92e416df1a9ccdfc59398d388a5f7b77235fc (patch) | |
tree | 100370a6c50537e5a8f3135b9e257a1fb8000af0 /backport | |
parent | ab3fd3b9a801a9faa2619e2e65207e736f859a6d (diff) |
header: Add kvzalloc()
This adds the kvzalloc() function and allows it to remove the
lib-rhashtable.patch patch.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
[fix commit message kzalloc -> kvzalloc]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'backport')
-rw-r--r-- | backport/backport-include/linux/mm.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/backport/backport-include/linux/mm.h b/backport/backport-include/linux/mm.h index 7e69b873..38c452e2 100644 --- a/backport/backport-include/linux/mm.h +++ b/backport/backport-include/linux/mm.h @@ -112,6 +112,12 @@ static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags) return kvmalloc(bytes, flags); } + +#define kvzalloc LINUX_BACKPORT(kvzalloc) +static inline void *kvzalloc(size_t size, gfp_t flags) +{ + return kvmalloc(size, flags | __GFP_ZERO); +} #endif #endif /* __BACKPORT_MM_H */ |