]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
btrfs: replace simple_strtoull() with kstrtoull()
authorZhangZhen <zhenzhang.zhang@huawei.com>
Tue, 13 May 2014 08:36:08 +0000 (16:36 +0800)
committerChris Mason <clm@fb.com>
Tue, 10 Jun 2014 00:20:51 +0000 (17:20 -0700)
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>
fs/btrfs/ioctl.c

index a21a4ac537b768842c3ce150428c23621e63c688..fba7a004e7e59c1a6d8dbb703933428bbfa5b683 100644 (file)
@@ -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;