aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-06-06 17:38:25 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-06 19:08:18 -0400
commit6edb56871a524a879c2356860917ebb01ffd20c4 (patch)
treef7e2eb75c7565f4031bba51a897fb4526f3f7578
parent4f4c337fb7fb946824a26e78e37b85ef25e0a4a2 (diff)
fs/dlm/lockspace.c: convert simple_str to kstr
Replace obsolete functions. Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: Christine Caulfield <ccaulfie@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--fs/dlm/lockspace.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index 04d6398c1f1c..f3e72787e7f9 100644
--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -35,8 +35,11 @@ static struct task_struct * scand_task;
35static ssize_t dlm_control_store(struct dlm_ls *ls, const char *buf, size_t len) 35static ssize_t dlm_control_store(struct dlm_ls *ls, const char *buf, size_t len)
36{ 36{
37 ssize_t ret = len; 37 ssize_t ret = len;
38 int n = simple_strtol(buf, NULL, 0); 38 int n;
39 int rc = kstrtoint(buf, 0, &n);
39 40
41 if (rc)
42 return rc;
40 ls = dlm_find_lockspace_local(ls->ls_local_handle); 43 ls = dlm_find_lockspace_local(ls->ls_local_handle);
41 if (!ls) 44 if (!ls)
42 return -EINVAL; 45 return -EINVAL;
@@ -57,7 +60,10 @@ static ssize_t dlm_control_store(struct dlm_ls *ls, const char *buf, size_t len)
57 60
58static ssize_t dlm_event_store(struct dlm_ls *ls, const char *buf, size_t len) 61static ssize_t dlm_event_store(struct dlm_ls *ls, const char *buf, size_t len)
59{ 62{
60 ls->ls_uevent_result = simple_strtol(buf, NULL, 0); 63 int rc = kstrtoint(buf, 0, &ls->ls_uevent_result);
64
65 if (rc)
66 return rc;
61 set_bit(LSFL_UEVENT_WAIT, &ls->ls_flags); 67 set_bit(LSFL_UEVENT_WAIT, &ls->ls_flags);
62 wake_up(&ls->ls_uevent_wait); 68 wake_up(&ls->ls_uevent_wait);
63 return len; 69 return len;
@@ -70,7 +76,10 @@ static ssize_t dlm_id_show(struct dlm_ls *ls, char *buf)
70 76
71static ssize_t dlm_id_store(struct dlm_ls *ls, const char *buf, size_t len) 77static ssize_t dlm_id_store(struct dlm_ls *ls, const char *buf, size_t len)
72{ 78{
73 ls->ls_global_id = simple_strtoul(buf, NULL, 0); 79 int rc = kstrtouint(buf, 0, &ls->ls_global_id);
80
81 if (rc)
82 return rc;
74 return len; 83 return len;
75} 84}
76 85
@@ -81,7 +90,11 @@ static ssize_t dlm_nodir_show(struct dlm_ls *ls, char *buf)
81 90
82static ssize_t dlm_nodir_store(struct dlm_ls *ls, const char *buf, size_t len) 91static ssize_t dlm_nodir_store(struct dlm_ls *ls, const char *buf, size_t len)
83{ 92{
84 int val = simple_strtoul(buf, NULL, 0); 93 int val;
94 int rc = kstrtoint(buf, 0, &val);
95
96 if (rc)
97 return rc;
85 if (val == 1) 98 if (val == 1)
86 set_bit(LSFL_NODIR, &ls->ls_flags); 99 set_bit(LSFL_NODIR, &ls->ls_flags);
87 return len; 100 return len;