aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2015-09-24 16:59:19 -0400
committerTejun Heo <tj@kernel.org>2015-09-24 16:59:19 -0400
commitc0522908d22e0b8669e01a7706720996c773e7f4 (patch)
tree2588f61e502038b87e13113fadd01cf2f0b4320a
parent10265075aa3a8629b0ccdcff4d10b17bd740defe (diff)
parent9badce000e2ce68ba74838a3cd356dde58221c2f (diff)
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>
-rw-r--r--include/linux/backing-dev.h10
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);
252 * @inode: inode of interest 252 * @inode: inode of interest
253 * 253 *
254 * cgroup writeback requires support from both the bdi and filesystem. 254 * cgroup writeback requires support from both the bdi and filesystem.
255 * Test whether @inode has both. 255 * Also, both memcg and iocg have to be on the default hierarchy. Test
256 * whether all conditions are met.
257 *
258 * Note that the test result may change dynamically on the same inode
259 * depending on how memcg and iocg are configured.
256 */ 260 */
257static inline bool inode_cgwb_enabled(struct inode *inode) 261static inline bool inode_cgwb_enabled(struct inode *inode)
258{ 262{
259 struct backing_dev_info *bdi = inode_to_bdi(inode); 263 struct backing_dev_info *bdi = inode_to_bdi(inode);
260 264
261 return bdi_cap_account_dirty(bdi) && 265 return cgroup_subsys_on_dfl(memory_cgrp_subsys) &&
266 cgroup_subsys_on_dfl(io_cgrp_subsys) &&
267 bdi_cap_account_dirty(bdi) &&
262 (bdi->capabilities & BDI_CAP_CGROUP_WRITEBACK) && 268 (bdi->capabilities & BDI_CAP_CGROUP_WRITEBACK) &&
263 (inode->i_sb->s_iflags & SB_I_CGROUPWB); 269 (inode->i_sb->s_iflags & SB_I_CGROUPWB);
264} 270}