From 77eeb3075890d306244e8b21913e0c9974809769 Mon Sep 17 00:00:00 2001 From: Don Brady Date: Thu, 25 Feb 2021 17:03:35 -0700 Subject: [PATCH] DLPX-74216 nfs-server restarts fail when order-5 allocations are exhausted (#3) --- fs/nfsd/filecache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c index 1e8c31ed6c7c4..fde013b6e05bf 100644 --- a/fs/nfsd/filecache.c +++ b/fs/nfsd/filecache.c @@ -634,8 +634,8 @@ nfsd_file_cache_init(void) if (!nfsd_filecache_wq) goto out; - nfsd_file_hashtbl = kvcalloc(NFSD_FILE_HASH_SIZE, - sizeof(*nfsd_file_hashtbl), GFP_KERNEL); + nfsd_file_hashtbl = kvzalloc(array_size(NFSD_FILE_HASH_SIZE, + sizeof(*nfsd_file_hashtbl)), GFP_KERNEL); if (!nfsd_file_hashtbl) { pr_err("nfsd: unable to allocate nfsd_file_hashtbl\n"); goto out_err;