diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-05-15 11:17:41 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-05-15 11:17:41 -0700 |
commit | 0336104dcba613586cd22279db445840d4ebcdeb (patch) | |
tree | 94df76934cc043810211f9de59d9d62ac20ec491 /fs/kernfs/dir.c | |
parent | f0897f4cc0fcdd2410ba0ff0bc1bc64e6e72672a (diff) | |
parent | b0dc2b9bb4ab782115b964310518ee0b17784277 (diff) | |
download | lwn-0336104dcba613586cd22279db445840d4ebcdeb.tar.gz lwn-0336104dcba613586cd22279db445840d4ebcdeb.zip |
Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton:
"8 fixes"
* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
mm, numa: really disable NUMA balancing by default on single node machines
MAINTAINERS: update Jingoo Han's email address
CMA: page_isolation: check buddy before accessing it
uidgid: make uid_valid and gid_valid work with !CONFIG_MULTIUSER
kernfs: do not account ino_ida allocations to memcg
gfp: add __GFP_NOACCOUNT
tools/vm: fix page-flags build
drivers/rtc/rtc-armada38x.c: remove unused local `flags'
Diffstat (limited to 'fs/kernfs/dir.c')
-rw-r--r-- | fs/kernfs/dir.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c index f131fc23ffc4..fffca9517321 100644 --- a/fs/kernfs/dir.c +++ b/fs/kernfs/dir.c @@ -518,7 +518,14 @@ static struct kernfs_node *__kernfs_new_node(struct kernfs_root *root, if (!kn) goto err_out1; - ret = ida_simple_get(&root->ino_ida, 1, 0, GFP_KERNEL); + /* + * If the ino of the sysfs entry created for a kmem cache gets + * allocated from an ida layer, which is accounted to the memcg that + * owns the cache, the memcg will get pinned forever. So do not account + * ino ida allocations. + */ + ret = ida_simple_get(&root->ino_ida, 1, 0, + GFP_KERNEL | __GFP_NOACCOUNT); if (ret < 0) goto err_out2; kn->ino = ret; |