diff mbox

[4.2.y-ckt,stable] Patch "writeback: initialize inode members that track writeback history" has been added to the 4.2.y-ckt tree

Message ID 1457390198-4949-1-git-send-email-kamal@canonical.com
State New
Headers show

Commit Message

Kamal Mostafa March 7, 2016, 10:36 p.m. UTC
This is a note to let you know that I have just added a patch titled

    writeback: initialize inode members that track writeback history

to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-4.2.y-queue

This patch is scheduled to be released in version 4.2.8-ckt5.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 4.2.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

---8<------------------------------------------------------------

From 84072fc06e2628004e00946d73a0bd02b15b715d Mon Sep 17 00:00:00 2001
From: Tahsin Erdogan <tahsin@google.com>
Date: Tue, 16 Feb 2016 13:34:39 -0800
Subject: writeback: initialize inode members that track writeback history

commit 3d65ae4634ed8350aee98a4e6f4e41fe40c7d282 upstream.

inode struct members that track cgroup writeback information
should be reinitialized when inode gets allocated from
kmem_cache. Otherwise, their values remain and get used by the
new inode.

Signed-off-by: Tahsin Erdogan <tahsin@google.com>
Acked-by: Tejun Heo <tj@kernel.org>
Fixes: d10c80955265 ("writeback: implement foreign cgroup inode bdi_writeback switching")
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 fs/inode.c | 6 ++++++
 1 file changed, 6 insertions(+)

--
2.7.0
diff mbox

Patch

diff --git a/fs/inode.c b/fs/inode.c
index d30640f..8d72fac 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -156,6 +156,12 @@  int inode_init_always(struct super_block *sb, struct inode *inode)
 	inode->i_rdev = 0;
 	inode->dirtied_when = 0;

+#ifdef CONFIG_CGROUP_WRITEBACK
+	inode->i_wb_frn_winner = 0;
+	inode->i_wb_frn_avg_time = 0;
+	inode->i_wb_frn_history = 0;
+#endif
+
 	if (security_inode_alloc(inode))
 		goto out;
 	spin_lock_init(&inode->i_lock);