[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1362730998-3263-2-git-send-email-lczerner@redhat.com>
Date: Fri, 8 Mar 2013 09:23:17 +0100
From: Lukas Czerner <lczerner@...hat.com>
To: linux-ext4@...r.kernel.org
Cc: Lukas Czerner <lczerner@...hat.com>
Subject: [PATCH 2/3] ext4: Use kstrtoul() instead of deprecated simple_strtoul()
In parse_strtoul() we're still using deprecated simple_strtoul(). Change
that in favour of kstrtoul().
Signed-off-by: Lukas Czerner <lczerner@...hat.com>
---
fs/ext4/super.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 620cf56..7bcdef1 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2359,14 +2359,12 @@ struct ext4_attr {
static int parse_strtoul(const char *buf,
unsigned long max, unsigned long *value)
{
- char *endp;
-
- *value = simple_strtoul(skip_spaces(buf), &endp, 0);
- endp = skip_spaces(endp);
- if (*endp || *value > max)
- return -EINVAL;
+ int ret;
- return 0;
+ ret = kstrtoul(skip_spaces(buf), 0, value);
+ if (!ret && *value > max)
+ ret = -EINVAL;
+ return ret;
}
static ssize_t delayed_allocation_blocks_show(struct ext4_attr *a,
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists