mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
cgroup: replace cftype->trigger() with cftype->write()
cftype->trigger() is pointless. It's trivial to ignore the input buffer from a regular ->write() operation. Convert all ->trigger() users to ->write() and remove ->trigger(). This patch doesn't introduce any visible behavior changes. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@suse.cz>
This commit is contained in:
parent
451af504df
commit
6770c64e5c
5 changed files with 35 additions and 43 deletions
|
|
@ -1034,8 +1034,7 @@ static umode_t cgroup_file_mode(const struct cftype *cft)
|
|||
if (cft->read_u64 || cft->read_s64 || cft->seq_show)
|
||||
mode |= S_IRUGO;
|
||||
|
||||
if (cft->write_u64 || cft->write_s64 || cft->write ||
|
||||
cft->trigger)
|
||||
if (cft->write_u64 || cft->write_s64 || cft->write)
|
||||
mode |= S_IWUSR;
|
||||
|
||||
return mode;
|
||||
|
|
@ -2750,8 +2749,6 @@ static ssize_t cgroup_file_write(struct kernfs_open_file *of, char *buf,
|
|||
ret = kstrtoll(buf, 0, &v);
|
||||
if (!ret)
|
||||
ret = cft->write_s64(css, cft, v);
|
||||
} else if (cft->trigger) {
|
||||
ret = cft->trigger(css, (unsigned int)cft->private);
|
||||
} else {
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue