mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
writeback: initialize inode members that track writeback history
[ Upstream commit3d65ae4634] 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:d10c809552("writeback: implement foreign cgroup inode bdi_writeback switching") Signed-off-by: Jens Axboe <axboe@fb.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cb8251f8d6
commit
9bda5e6b18
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user