aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugh Dickins <[email protected]>2021-05-04 18:37:54 -0700
committerLinus Torvalds <[email protected]>2021-05-05 11:27:25 -0700
commit6d99a4c029c01cd7d075f7f9fa3b8b620e49a9f7 (patch)
treecc62e23c27c86df3015171d529da721113a932c4
parent76d8cc3c8f45cc597726616f11db4180f7e21ce0 (diff)
mm: no more EINVAL from /proc/sys/vm/stat_refresh
EINVAL was good for drawing the refresher's attention to a warning in dmesg, but became very tiresome when running test suites scripted with "set -e": an underflow from a bug in one feature would cause unrelated tests much later to fail, just because their /proc/sys/vm/stat_refresh touch failed with that error. Stop doing that. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Hugh Dickins <[email protected]> Acked-by: Roman Gushchin <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Vlastimil Babka <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/vmstat.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 14d0ba4fd46b..1fb91d5a2b60 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1862,7 +1862,6 @@ int vmstat_refresh(struct ctl_table *table, int write,
if (val < 0) {
pr_warn("%s: %s %ld\n",
__func__, zone_stat_name(i), val);
- err = -EINVAL;
}
}
#ifdef CONFIG_NUMA
@@ -1871,7 +1870,6 @@ int vmstat_refresh(struct ctl_table *table, int write,
if (val < 0) {
pr_warn("%s: %s %ld\n",
__func__, numa_stat_name(i), val);
- err = -EINVAL;
}
}
#endif
@@ -1880,11 +1878,8 @@ int vmstat_refresh(struct ctl_table *table, int write,
if (val < 0) {
pr_warn("%s: %s %ld\n",
__func__, node_stat_name(i), val);
- err = -EINVAL;
}
}
- if (err)
- return err;
if (write)
*ppos += *lenp;
else