diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cachefiles/daemon.c | 4 | ||||
-rw-r--r-- | fs/ext4/super.c | 7 |
2 files changed, 4 insertions, 7 deletions
diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c index 4618516dd994..c2413561ea75 100644 --- a/fs/cachefiles/daemon.c +++ b/fs/cachefiles/daemon.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/mount.h> | 21 | #include <linux/mount.h> |
22 | #include <linux/statfs.h> | 22 | #include <linux/statfs.h> |
23 | #include <linux/ctype.h> | 23 | #include <linux/ctype.h> |
24 | #include <linux/string.h> | ||
24 | #include <linux/fs_struct.h> | 25 | #include <linux/fs_struct.h> |
25 | #include "internal.h" | 26 | #include "internal.h" |
26 | 27 | ||
@@ -257,8 +258,7 @@ static ssize_t cachefiles_daemon_write(struct file *file, | |||
257 | if (args == data) | 258 | if (args == data) |
258 | goto error; | 259 | goto error; |
259 | *args = '\0'; | 260 | *args = '\0'; |
260 | for (args++; isspace(*args); args++) | 261 | args = skip_spaces(++args); |
261 | continue; | ||
262 | } | 262 | } |
263 | 263 | ||
264 | /* run the appropriate command handler */ | 264 | /* run the appropriate command handler */ |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 768c111a77ec..827bde1f2594 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -2137,11 +2137,8 @@ static int parse_strtoul(const char *buf, | |||
2137 | { | 2137 | { |
2138 | char *endp; | 2138 | char *endp; |
2139 | 2139 | ||
2140 | while (*buf && isspace(*buf)) | 2140 | *value = simple_strtoul(skip_spaces(buf), &endp, 0); |
2141 | buf++; | 2141 | endp = skip_spaces(endp); |
2142 | *value = simple_strtoul(buf, &endp, 0); | ||
2143 | while (*endp && isspace(*endp)) | ||
2144 | endp++; | ||
2145 | if (*endp || *value > max) | 2142 | if (*endp || *value > max) |
2146 | return -EINVAL; | 2143 | return -EINVAL; |
2147 | 2144 | ||