From: Daniel Walker <dwalker@fifo99.com>
To: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] fs: libfs: remove calls to simple_strtoll
Date: Fri, 25 Oct 2013 19:33:11 -0700 [thread overview]
Message-ID: <1382754793-8827-1-git-send-email-dwalker@fifo99.com> (raw)
Signed-off-by: Daniel Walker <dwalker@fifo99.com>
---
fs/libfs.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/fs/libfs.c b/fs/libfs.c
index 8c50184..0467f6e 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -845,10 +845,13 @@ ssize_t simple_attr_write(struct file *file, const char __user *buf,
goto out;
attr->set_buf[size] = '\0';
- val = simple_strtoll(attr->set_buf, NULL, 0);
- ret = attr->set(attr->data, val);
- if (ret == 0)
- ret = len; /* on success, claim we got the whole input */
+ ret = kstrtoll(attr->set_buf, 0, &val);
+ if (ret == 0) {
+ ret = attr->set(attr->data, val);
+ if (ret == 0)
+ /* on success, claim we got the whole input */
+ ret = len;
+ }
out:
mutex_unlock(&attr->mutex);
return ret;
--
1.8.3.2
reply other threads:[~2013-10-26 2:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1382754793-8827-1-git-send-email-dwalker@fifo99.com \
--to=dwalker@fifo99.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®