ext4: check return value of kstrtoull correctly in reserved_clusters_store
authorChao Yu <yuchao0@huawei.com>
Fri, 23 Jun 2017 05:08:22 +0000 (01:08 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Jul 2017 10:16:16 +0000 (12:16 +0200)
commitc0d3a7bdc7c29e2c34e9d6580d28c0cec6973182
tree9708d479e26f4573c6ab8e62cf909eedb11bdf68
parent716986547f1f052a7f49b5e5502e76db3a32d3e7
ext4: check return value of kstrtoull correctly in reserved_clusters_store

commit 1ea1516fbbab2b30bf98c534ecaacba579a35208 upstream.

kstrtoull returns 0 on success, however, in reserved_clusters_store we
will return -EINVAL if kstrtoull returns 0, it makes us fail to update
reserved_clusters value through sysfs.

Fixes: 76d33bca5581b1dd5c3157fa168db849a784ada4
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Miao Xie <miaoxie@huawei.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/sysfs.c