
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ICVT69 -------------------------------- Since L2_MON does not support the limbo mechanism, the max_threshold_occupancy interface does not allow updates. If a write operation is attempted, skip it simply and return nbytes. Fixes: da5038956e65 ("fs/resctrl: L2_MON does not support the limbo mechanism") Signed-off-by: Zeng Heng <zengheng4@huawei.com> --- fs/resctrl/rdtgroup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c index 86567d32e4df..4e0b2dfaa436 100644 --- a/fs/resctrl/rdtgroup.c +++ b/fs/resctrl/rdtgroup.c @@ -1336,7 +1336,7 @@ static ssize_t max_threshold_occ_write(struct kernfs_open_file *of, int ret; if (r->cache_level != 3) - return 0; + goto out; ret = kstrtouint(buf, 0, &bytes); if (ret) @@ -1347,6 +1347,7 @@ static ssize_t max_threshold_occ_write(struct kernfs_open_file *of, resctrl_rmid_realloc_threshold = resctrl_arch_round_mon_val(bytes); +out: return nbytes; } -- 2.25.1