diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-02-08 17:14:11 +0300 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2020-03-16 15:34:29 +0300 |
commit | a8b373eefc82094ba84bf35a770cdb21196224e4 (patch) | |
tree | ca983a1a3652133a2bb35a34e9eefb05f8c824b4 /fs/nfs | |
parent | 49cd32543fa68889111c66c79cc0a6ed2ec02019 (diff) | |
download | linux-a8b373eefc82094ba84bf35a770cdb21196224e4.tar.xz |
NFS: Limit the size of the access cache by default
Currently, we have no real limit on the access cache size (we set it
to ULONG_MAX). That can lead to credentials getting pinned for a
very long time on lots of files if you have a system with a lot of
memory.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 5e23855e8097..f22366f350a9 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -2309,7 +2309,7 @@ static DEFINE_SPINLOCK(nfs_access_lru_lock); static LIST_HEAD(nfs_access_lru_list); static atomic_long_t nfs_access_nr_entries; -static unsigned long nfs_access_max_cachesize = ULONG_MAX; +static unsigned long nfs_access_max_cachesize = 4*1024*1024; module_param(nfs_access_max_cachesize, ulong, 0644); MODULE_PARM_DESC(nfs_access_max_cachesize, "NFS access maximum total cache length"); |