Commit 3d65ae46 authored by Tahsin Erdogan's avatar Tahsin Erdogan Committed by Jens Axboe

writeback: initialize inode members that track writeback history

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: default avatarTahsin Erdogan <tahsin@google.com>
Acked-by: default avatarTejun Heo <tj@kernel.org>
Fixes: d10c8095 ("writeback: implement foreign cgroup inode bdi_writeback switching")
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 5ff8eaac
...@@ -154,6 +154,12 @@ int inode_init_always(struct super_block *sb, struct inode *inode) ...@@ -154,6 +154,12 @@ int inode_init_always(struct super_block *sb, struct inode *inode)
inode->i_rdev = 0; inode->i_rdev = 0;
inode->dirtied_when = 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)) if (security_inode_alloc(inode))
goto out; goto out;
spin_lock_init(&inode->i_lock); spin_lock_init(&inode->i_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment