[PATCH OLK-6.6] fs/resctrl: Fix max_threshold_occupancy write operation

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

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/17841 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/EMS... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/17841 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/EMS...
participants (2)
-
patchwork bot
-
Zeng Heng