mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 15:58:47 +00:00
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/alpine.LSU.2.11.2102251510410.13363@eggly.anvils Signed-off-by: Hugh Dickins <hughd@google.com> Acked-by: Roman Gushchin <guro@fb.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@kernel.org> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
76d8cc3c8f
commit
6d99a4c029
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user