aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/res_counter.c
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-06-04 19:11:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 19:54:15 -0400
commit6c5a53c67057bddf7f8e26c93a8e045215f61539 (patch)
tree531badfdaccd5f80e3dedd21cc890c0525ec2433 /kernel/res_counter.c
parentcac92ba74f19fd58a28976f753f9327f27cf1669 (diff)
kernel/res_counter.c: replace simple_strtoull by kstrtoull
[akpm@linux-foundation.org: don't overwrite kstrtoull()'s errno] Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: Michal Hocko <mhocko@suse.cz> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/res_counter.c')
-rw-r--r--kernel/res_counter.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/res_counter.c b/kernel/res_counter.c
index 51dbac6a3633..e791130f85a7 100644
--- a/kernel/res_counter.c
+++ b/kernel/res_counter.c
@@ -186,8 +186,11 @@ int res_counter_memparse_write_strategy(const char *buf,
186 186
187 /* return RES_COUNTER_MAX(unlimited) if "-1" is specified */ 187 /* return RES_COUNTER_MAX(unlimited) if "-1" is specified */
188 if (*buf == '-') { 188 if (*buf == '-') {
189 res = simple_strtoull(buf + 1, &end, 10); 189 int rc = kstrtoull(buf + 1, 10, &res);
190 if (res != 1 || *end != '\0') 190
191 if (rc)
192 return rc;
193 if (res != 1)
191 return -EINVAL; 194 return -EINVAL;
192 *resp = RES_COUNTER_MAX; 195 *resp = RES_COUNTER_MAX;
193 return 0; 196 return 0;