UPSTREAM: cgroup, blkcg: Prepare some symbols for module and !CONFIG_CGROUP usages
btrfs is going to use css_put() and wbc helpers to improve cgroup writeback support. Add dummy css_get() definition and export wbc helpers to prepare for module and !CONFIG_CGROUP builds. Reported-by: kbuild test robot <lkp@intel.com> Reviewed-by: Jan Kara <jack@suse.cz> Change-Id: I2fef472a0ce04d6bb32213500f57c72045b13633 Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sorayukii <sorayukii69@gmail.com>
This commit is contained in:
parent
41b248b887
commit
7c73e874db
3 changed files with 4 additions and 0 deletions
|
|
@ -44,6 +44,7 @@ struct blkcg blkcg_root;
|
||||||
EXPORT_SYMBOL_GPL(blkcg_root);
|
EXPORT_SYMBOL_GPL(blkcg_root);
|
||||||
|
|
||||||
struct cgroup_subsys_state * const blkcg_root_css = &blkcg_root.css;
|
struct cgroup_subsys_state * const blkcg_root_css = &blkcg_root.css;
|
||||||
|
EXPORT_SYMBOL_GPL(blkcg_root_css);
|
||||||
|
|
||||||
static struct blkcg_policy *blkcg_policy[BLKCG_MAX_POLS];
|
static struct blkcg_policy *blkcg_policy[BLKCG_MAX_POLS];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -598,6 +598,7 @@ void wbc_attach_and_unlock_inode(struct writeback_control *wbc,
|
||||||
if (unlikely(wb_dying(wbc->wb) && !css_is_dying(wbc->wb->memcg_css)))
|
if (unlikely(wb_dying(wbc->wb) && !css_is_dying(wbc->wb->memcg_css)))
|
||||||
inode_switch_wbs(inode, wbc->wb_id);
|
inode_switch_wbs(inode, wbc->wb_id);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(wbc_attach_and_unlock_inode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wbc_detach_inode - disassociate wbc from inode and perform foreign detection
|
* wbc_detach_inode - disassociate wbc from inode and perform foreign detection
|
||||||
|
|
@ -717,6 +718,7 @@ void wbc_detach_inode(struct writeback_control *wbc)
|
||||||
wb_put(wbc->wb);
|
wb_put(wbc->wb);
|
||||||
wbc->wb = NULL;
|
wbc->wb = NULL;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(wbc_detach_inode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wbc_account_io - account IO issued during writeback
|
* wbc_account_io - account IO issued during writeback
|
||||||
|
|
|
||||||
|
|
@ -704,6 +704,7 @@ void cgroup_path_from_kernfs_id(u64 id, char *buf, size_t buflen);
|
||||||
struct cgroup_subsys_state;
|
struct cgroup_subsys_state;
|
||||||
struct cgroup;
|
struct cgroup;
|
||||||
|
|
||||||
|
static inline void css_get(struct cgroup_subsys_state *css) {}
|
||||||
static inline void css_put(struct cgroup_subsys_state *css) {}
|
static inline void css_put(struct cgroup_subsys_state *css) {}
|
||||||
static inline int cgroup_attach_task_all(struct task_struct *from,
|
static inline int cgroup_attach_task_all(struct task_struct *from,
|
||||||
struct task_struct *t) { return 0; }
|
struct task_struct *t) { return 0; }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue