diff options
author | Tejun Heo <tj@kernel.org> | 2015-09-24 23:59:19 +0300 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2015-09-24 23:59:19 +0300 |
commit | c0522908d22e0b8669e01a7706720996c773e7f4 (patch) | |
tree | 2588f61e502038b87e13113fadd01cf2f0b4320a /include/linux | |
parent | 10265075aa3a8629b0ccdcff4d10b17bd740defe (diff) | |
parent | 9badce000e2ce68ba74838a3cd356dde58221c2f (diff) | |
download | linux-c0522908d22e0b8669e01a7706720996c773e7f4.tar.xz |
cgroup: Merge branch 'for-4.3-fixes' into for-4.4
Pull to receive 9badce000e2c ("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 9e10a130d9b6 ("cgroup: replace cgroup_on_dfl()
tests in controllers with cgroup_subsys_on_dfl()"). The conflict is
fixed during this merge.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/backing-dev.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 5a5d79ee256f..08d9a8eac42c 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h @@ -252,13 +252,19 @@ int inode_congested(struct inode *inode, int cong_bits); * @inode: inode of interest * * 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) { 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) && (inode->i_sb->s_iflags & SB_I_CGROUPWB); } |