Skip to content

Commit

Permalink
cgroup: Merge branch 'for-4.3-fixes' into for-4.4
Browse files Browse the repository at this point in the history
Pull to receive 9badce0 ("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 9e10a13 ("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>
  • Loading branch information
Tejun Heo committed Sep 24, 2015
2 parents 1026507 + 9badce0 commit c052290
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions include/linux/backing-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c052290

Please sign in to comment.