[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190401170056.764925105@linuxfoundation.org>
Date: Mon, 1 Apr 2019 19:02:03 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Tahsin Erdogan <tahsin@...gle.com>,
Tejun Heo <tj@...nel.org>, Jens Axboe <axboe@...com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 4.4 053/131] writeback: initialize inode members that track writeback history
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
[ Upstream commit 3d65ae4634ed8350aee98a4e6f4e41fe40c7d282 ]
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@...gle.com>
Acked-by: Tejun Heo <tj@...nel.org>
Fixes: d10c80955265 ("writeback: implement foreign cgroup inode bdi_writeback switching")
Signed-off-by: Jens Axboe <axboe@...com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
fs/inode.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/fs/inode.c b/fs/inode.c
index a39c2724d8a0..b5c3a6473aaa 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -154,6 +154,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);
--
2.19.1
Powered by blists - more mailing lists