Commit c0522908 authored by Tejun Heo's avatar Tejun Heo

cgroup: Merge branch 'for-4.3-fixes' into for-4.4

Pull to receive 9badce00 ("cgroup, writeback: don't enable cgroup
writeback on traditional hierarchies").  The commit adds
cgroup_on_dfl() usages in include/linux/backing-dev.h thus causing a
silent conflict with 9e10a130 ("cgroup: replace cgroup_on_dfl()
tests in controllers with cgroup_subsys_on_dfl()").  The conflict is
fixed during this merge.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parents 10265075 9badce00
...@@ -252,13 +252,19 @@ int inode_congested(struct inode *inode, int cong_bits); ...@@ -252,13 +252,19 @@ int inode_congested(struct inode *inode, int cong_bits);
* @inode: inode of interest * @inode: inode of interest
* *
* cgroup writeback requires support from both the bdi and filesystem. * cgroup writeback requires support from both the bdi and filesystem.
* Test whether @inode has both. * Also, both memcg and iocg have to be on the default hierarchy. Test
* whether all conditions are met.
*
* Note that the test result may change dynamically on the same inode
* depending on how memcg and iocg are configured.
*/ */
static inline bool inode_cgwb_enabled(struct inode *inode) static inline bool inode_cgwb_enabled(struct inode *inode)
{ {
struct backing_dev_info *bdi = inode_to_bdi(inode); struct backing_dev_info *bdi = inode_to_bdi(inode);
return bdi_cap_account_dirty(bdi) && return cgroup_subsys_on_dfl(memory_cgrp_subsys) &&
cgroup_subsys_on_dfl(io_cgrp_subsys) &&
bdi_cap_account_dirty(bdi) &&
(bdi->capabilities & BDI_CAP_CGROUP_WRITEBACK) && (bdi->capabilities & BDI_CAP_CGROUP_WRITEBACK) &&
(inode->i_sb->s_iflags & SB_I_CGROUPWB); (inode->i_sb->s_iflags & SB_I_CGROUPWB);
} }
......
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