forked from luck/tmp_suning_uos_patched
cgroup: Merge branch 'for-4.3-fixes' into for-4.4
Pull to receive9badce000e
("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 with9e10a130d9
("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>
This commit is contained in:
commit
c0522908d2
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user