]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
nfsd: more robust allocation failure handling in nfsd_file_cache_init
authorAmir Goldstein <amir73il@gmail.com>
Thu, 24 Feb 2022 16:17:05 +0000 (18:17 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 12:38:06 +0000 (14:38 +0200)
commit0f565d389722cf65a40e709edc39d989fac2a380
tree32c334f4d67e9f57b139e9aba5f692452be19439
parentff271403d974ee2f6bfc4ed2967e50334d57564c
nfsd: more robust allocation failure handling in nfsd_file_cache_init

BugLink: https://bugs.launchpad.net/bugs/1969110
[ Upstream commit 4d2eeafecd6c83b4444db3dc0ada201c89b1aa44 ]

The nfsd file cache table can be pretty large and its allocation
may require as many as 80 contigious pages.

Employ the same fix that was employed for similar issue that was
reported for the reply cache hash table allocation several years ago
by commit 8f97514b423a ("nfsd: more robust allocation failure handling
in nfsd_reply_cache_init").

Fixes: 65294c1f2c5e ("nfsd: add a new struct file caching facility to nfsd")
Link: https://lore.kernel.org/linux-nfs/e3cdaeec85a6cfec980e87fc294327c0381c1778.camel@kernel.org/
Suggested-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit cc91880f041705062aab4cc1d4e1271f4ecabd08)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
fs/nfsd/filecache.c