Message ID | 1455658479-12433-1-git-send-email-tahsin@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hello, On Tue, Feb 16, 2016 at 01:34:39PM -0800, Tahsin Erdogan wrote: > 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> This one should go for 4.5 and also prolly have the following tag. Fixes: d10c80955265 ("writeback: implement foreign cgroup inode bdi_writeback switching") Thanks.
On 02/16/2016 02:49 PM, Tejun Heo wrote: > Hello, > > On Tue, Feb 16, 2016 at 01:34:39PM -0800, Tahsin Erdogan wrote: >> 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> > > This one should go for 4.5 and also prolly have the following tag. > > Fixes: d10c80955265 ("writeback: implement foreign cgroup inode bdi_writeback switching") I've added it for 4.5 with the fixes tag.
diff --git a/fs/inode.c b/fs/inode.c index 9f62db3..69b8b52 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);