summaryrefslogtreecommitdiff
path: root/fs/kernfs/dir.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-05-15 18:17:41 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2015-05-15 18:17:41 (GMT)
commit0336104dcba613586cd22279db445840d4ebcdeb (patch)
tree94df76934cc043810211f9de59d9d62ac20ec491 /fs/kernfs/dir.c
parentf0897f4cc0fcdd2410ba0ff0bc1bc64e6e72672a (diff)
parentb0dc2b9bb4ab782115b964310518ee0b17784277 (diff)
downloadlinux-0336104dcba613586cd22279db445840d4ebcdeb.tar.xz
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.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
index f131fc2..fffca95 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;