* [PATCH 1/3] fs: libfs: remove calls to simple_strtoll
@ 2013-10-26 2:33 Daniel Walker
0 siblings, 0 replies; only message in thread
From: Daniel Walker @ 2013-10-26 2:33 UTC (permalink / raw)
To: Alexander Viro; +Cc: linux-fsdevel, linux-kernel
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-10-26 2:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-26 2:33 [PATCH 1/3] fs: libfs: remove calls to simple_strtoll Daniel Walker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).