From: ZhangZhen Date: Tue, 13 May 2014 08:36:08 +0000 (+0800) Subject: btrfs: replace simple_strtoull() with kstrtoull() X-Git-Tag: v3.16-rc1~45^2~36 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=58dfae6365666e26cb2d172dc437773120fc4e1a;p=karo-tx-linux.git 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: Zhang Zhen Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index a21a4ac537b7..fba7a004e7e5 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -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;