Commit 58dfae63 authored by ZhangZhen's avatar ZhangZhen Committed by Chris Mason

btrfs: replace simple_strtoull() with kstrtoull()

use the newer and more pleasant kstrtoull() to replace simple_strtoull(),
because simple_strtoull() is marked for obsoletion.
Signed-off-by: default avatarZhang Zhen <zhenzhang.zhang@huawei.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 29865841
...@@ -1503,11 +1503,12 @@ static noinline int btrfs_ioctl_resize(struct file *file, ...@@ -1503,11 +1503,12 @@ static noinline int btrfs_ioctl_resize(struct file *file,
sizestr = vol_args->name; sizestr = vol_args->name;
devstr = strchr(sizestr, ':'); devstr = strchr(sizestr, ':');
if (devstr) { if (devstr) {
char *end;
sizestr = devstr + 1; sizestr = devstr + 1;
*devstr = '\0'; *devstr = '\0';
devstr = vol_args->name; devstr = vol_args->name;
devid = simple_strtoull(devstr, &end, 10); ret = kstrtoull(devstr, 10, &devid);
if (ret)
goto out_free;
if (!devid) { if (!devid) {
ret = -EINVAL; ret = -EINVAL;
goto out_free; goto out_free;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment