[Devel] [PATCH rh7 11/9] fs: fix accounting pipe buffers to kmemcg
Vladimir Davydov
vdavydov at virtuozzo.com
Fri Apr 29 08:05:02 PDT 2016
After we switched to the whitelist kmem accounting design, using
alloc_kmem_pages is not enough for the new page to be accounted -
one must also pass __GFP_ACCOUNT in gfp flags.
Signed-off-by: Vladimir Davydov <vdavydov at virtuozzo.com>
---
fs/pipe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/pipe.c b/fs/pipe.c
index 57aa78e7c63e..d038ff89a43f 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -590,7 +590,7 @@ redo1:
size_t remaining;
if (!page) {
- page = alloc_kmem_pages(GFP_HIGHUSER, 0);
+ page = alloc_kmem_pages(GFP_HIGHUSER | __GFP_ACCOUNT, 0);
if (unlikely(!page)) {
ret = ret ? : -ENOMEM;
break;
--
2.1.4
More information about the Devel
mailing list