aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2022-01-29 13:04:10 -0500
committerTrond Myklebust <trond.myklebust@hammerspace.com>2022-02-25 18:50:12 -0500
commitd7867712d81c05680beff2c9645ff1e8fa59a41d (patch)
tree12eda63f9fb670032039fc52693f9242707ab5d0 /fs/nfs/dir.c
parentNFSv4: Protect the state recovery thread against direct reclaim (diff)
downloadlinux-dev-d7867712d81c05680beff2c9645ff1e8fa59a41d.tar.xz
linux-dev-d7867712d81c05680beff2c9645ff1e8fa59a41d.zip
NFS: Charge open/lock file contexts to kmemcg
Allow kmemcg to limit the number of open/lock file contexts, in the same way that it limits the parent file descriptors. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 75cb1cbe4cde..fbb4a522d716 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -73,7 +73,7 @@ static struct nfs_open_dir_context *alloc_nfs_open_dir_context(struct inode *dir
{
struct nfs_inode *nfsi = NFS_I(dir);
struct nfs_open_dir_context *ctx;
- ctx = kmalloc(sizeof(*ctx), GFP_KERNEL);
+ ctx = kmalloc(sizeof(*ctx), GFP_KERNEL_ACCOUNT);
if (ctx != NULL) {
ctx->duped = 0;
ctx->attr_gencount = nfsi->attr_gencount;