summaryrefslogtreecommitdiff
path: root/fs/ntfs3
diff options
context:
space:
mode:
authorKenneth Lee <klee33@uw.edu>2022-08-19 08:51:17 +0300
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2022-09-30 17:39:51 +0300
commit92f017c4aee6e2bb79593adeacccbea3afe62223 (patch)
tree0395b4fccb3bda4ad1e37ab0ce54d17d54c1d94c /fs/ntfs3
parent6d5c9e79b726cc473d40e9cb60976dbe8e669624 (diff)
downloadlinux-92f017c4aee6e2bb79593adeacccbea3afe62223.tar.xz
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')
-rw-r--r--fs/ntfs3/bitmap.c2
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;