[PATCH] fs-mm-account-buffer_head-to-kmemcg.patch.fix

From: Shakeel Butt
Date: Mon Jul 02 2018 - 18:02:20 EST


The patch "fs, mm: account buffer_head to kmemcg" missed to add
__GFP_ACCOUNT flag into the gfp mask for directed memcg charging. So,
adding it. Andrew, please squash this into the original patch.

Signed-off-by: Shakeel Butt <shakeelb@xxxxxxxxxx>
---
fs/buffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/buffer.c b/fs/buffer.c
index e08863af56f6..405d4723ed3d 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -814,7 +814,7 @@ struct buffer_head *alloc_page_buffers(struct page *page, unsigned long size,
bool retry)
{
struct buffer_head *bh, *head;
- gfp_t gfp = GFP_NOFS;
+ gfp_t gfp = GFP_NOFS | __GFP_ACCOUNT;
long offset;
struct mem_cgroup *memcg;

--
2.18.0.399.gad0ab374a1-goog