diff options
author | Tahsin Erdogan <tahsin@google.com> | 2016-02-17 00:34:39 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-02-17 00:57:21 +0300 |
commit | 3d65ae4634ed8350aee98a4e6f4e41fe40c7d282 (patch) | |
tree | 4efaf7fb8a92eeb7fb5a1d854fa8172512d28696 /fs | |
parent | 5ff8eaac1636bf6deae86491f4818c4c69d1a9ac (diff) | |
download | linux-3d65ae4634ed8350aee98a4e6f4e41fe40c7d282.tar.xz |
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: 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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/inode.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/inode.c b/fs/inode.c index 9f62db3bcc3e..69b8b526c194 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); |