diff options
| author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-04-03 22:30:39 -0400 |
|---|---|---|
| committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-05-21 20:13:56 -0400 |
| commit | c9b5d9cd26bde01a0591cd8eeed8847da997f576 (patch) | |
| tree | edfeb8c31f05c1c162d78890807ee697fc1a8ca0 /fs/bcachefs/util.h | |
| parent | bcachefs: add missing include (diff) | |
| download | linux-c9b5d9cd26bde01a0591cd8eeed8847da997f576.tar.gz linux-c9b5d9cd26bde01a0591cd8eeed8847da997f576.zip | |
bcachefs: bch2_kvmalloc() mem alloc profiling
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/util.h')
| -rw-r--r-- | fs/bcachefs/util.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/bcachefs/util.h b/fs/bcachefs/util.h index 3e52c7f8ddd2..ccc1cf699c4b 100644 --- a/fs/bcachefs/util.h +++ b/fs/bcachefs/util.h @@ -55,15 +55,16 @@ static inline size_t buf_pages(void *p, size_t len) PAGE_SIZE); } -static inline void *bch2_kvmalloc(size_t n, gfp_t flags) +static inline void *bch2_kvmalloc_noprof(size_t n, gfp_t flags) { void *p = unlikely(n >= INT_MAX) - ? vmalloc(n) - : kvmalloc(n, flags & ~__GFP_ZERO); + ? vmalloc_noprof(n) + : kvmalloc_noprof(n, flags & ~__GFP_ZERO); if (p && (flags & __GFP_ZERO)) memset(p, 0, n); return p; } +#define bch2_kvmalloc(...) alloc_hooks(bch2_kvmalloc_noprof(__VA_ARGS__)) #define init_heap(heap, _size, gfp) \ ({ \ |
