diff options
Diffstat (limited to 'fs/ext3/super.c')
-rw-r--r-- | fs/ext3/super.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 5ed0044fbb37..9b6479dfb02e 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c @@ -902,17 +902,18 @@ static ext3_fsblk_t get_sb_block(void **data, struct super_block *sb) { ext3_fsblk_t sb_block; char *options = (char *) *data; + int rv; if (!options || strncmp(options, "sb=", 3) != 0) return 1; /* Default location */ options += 3; - /*todo: use simple_strtoll with >32bit ext3 */ - sb_block = simple_strtoul(options, &options, 0); - if (*options && *options != ',') { + rv = parse_integer(options, 0, &sb_block); + if (rv < 0 || (options[rv] && options[rv] != ',')) { ext3_msg(sb, KERN_ERR, "error: invalid sb specification: %s", (char *) *data); return 1; } + options += rv; if (*options == ',') options++; *data = (void *) options; |