diff options
author | Kenneth Lee <klee33@uw.edu> | 2022-08-18 22:51:17 -0700 |
---|---|---|
committer | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2022-09-30 17:39:51 +0300 |
commit | 92f017c4aee6e2bb79593adeacccbea3afe62223 (patch) | |
tree | 0395b4fccb3bda4ad1e37ab0ce54d17d54c1d94c /fs/ntfs3/bitmap.c | |
parent | 6d5c9e79b726cc473d40e9cb60976dbe8e669624 (diff) |
fs/ntfs3: Use kmalloc_array for allocating multiple elements
Prefer using kmalloc_array(a, b) over kmalloc(a * b) as this
improves semantics since kmalloc is intended for allocating an
array of memory.
Signed-off-by: Kenneth Lee <klee33@uw.edu>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs/ntfs3/bitmap.c')
-rw-r--r-- | fs/ntfs3/bitmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ntfs3/bitmap.c b/fs/ntfs3/bitmap.c index 5d44ceac855b..1675c9a69788 100644 --- a/fs/ntfs3/bitmap.c +++ b/fs/ntfs3/bitmap.c @@ -1324,7 +1324,7 @@ int wnd_extend(struct wnd_bitmap *wnd, size_t new_bits) new_last = wbits; if (new_wnd != wnd->nwnd) { - new_free = kmalloc(new_wnd * sizeof(u16), GFP_NOFS); + new_free = kmalloc_array(new_wnd, sizeof(u16), GFP_NOFS); if (!new_free) return -ENOMEM; |