Skip to content

Commit

Permalink
btrfs: replace simple_strtoull() with kstrtoull()
Browse files Browse the repository at this point in the history
use the newer and more pleasant kstrtoull() to replace simple_strtoull(),
because simple_strtoull() is marked for obsoletion.

Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
Signed-off-by: Chris Mason <clm@fb.com>
  • Loading branch information
ZhangZhen authored and Chris Mason committed Jun 10, 2014
1 parent 2986584 commit 58dfae6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1503,11 +1503,12 @@ static noinline int btrfs_ioctl_resize(struct file *file,
sizestr = vol_args->name;
devstr = strchr(sizestr, ':');
if (devstr) {
char *end;
sizestr = devstr + 1;
*devstr = '\0';
devstr = vol_args->name;
devid = simple_strtoull(devstr, &end, 10);
ret = kstrtoull(devstr, 10, &devid);
if (ret)
goto out_free;
if (!devid) {
ret = -EINVAL;
goto out_free;
Expand Down

0 comments on commit 58dfae6

Please sign in to comment.