Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -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;