Commit 6edb5687 authored by Fabian Frederick's avatar Fabian Frederick Committed by Linus Torvalds

fs/dlm/lockspace.c: convert simple_str to kstr

Replace obsolete functions.
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Cc: Christine Caulfield <ccaulfie@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4f4c337f
...@@ -35,8 +35,11 @@ static struct task_struct * scand_task; ...@@ -35,8 +35,11 @@ static struct task_struct * scand_task;
static ssize_t dlm_control_store(struct dlm_ls *ls, const char *buf, size_t len) static ssize_t dlm_control_store(struct dlm_ls *ls, const char *buf, size_t len)
{ {
ssize_t ret = len; ssize_t ret = len;
int n = simple_strtol(buf, NULL, 0); int n;
int rc = kstrtoint(buf, 0, &n);
if (rc)
return rc;
ls = dlm_find_lockspace_local(ls->ls_local_handle); ls = dlm_find_lockspace_local(ls->ls_local_handle);
if (!ls) if (!ls)
return -EINVAL; return -EINVAL;
...@@ -57,7 +60,10 @@ static ssize_t dlm_control_store(struct dlm_ls *ls, const char *buf, size_t len) ...@@ -57,7 +60,10 @@ static ssize_t dlm_control_store(struct dlm_ls *ls, const char *buf, size_t len)
static ssize_t dlm_event_store(struct dlm_ls *ls, const char *buf, size_t len) static ssize_t dlm_event_store(struct dlm_ls *ls, const char *buf, size_t len)
{ {
ls->ls_uevent_result = simple_strtol(buf, NULL, 0); int rc = kstrtoint(buf, 0, &ls->ls_uevent_result);
if (rc)
return rc;
set_bit(LSFL_UEVENT_WAIT, &ls->ls_flags); set_bit(LSFL_UEVENT_WAIT, &ls->ls_flags);
wake_up(&ls->ls_uevent_wait); wake_up(&ls->ls_uevent_wait);
return len; return len;
...@@ -70,7 +76,10 @@ static ssize_t dlm_id_show(struct dlm_ls *ls, char *buf) ...@@ -70,7 +76,10 @@ static ssize_t dlm_id_show(struct dlm_ls *ls, char *buf)
static ssize_t dlm_id_store(struct dlm_ls *ls, const char *buf, size_t len) static ssize_t dlm_id_store(struct dlm_ls *ls, const char *buf, size_t len)
{ {
ls->ls_global_id = simple_strtoul(buf, NULL, 0); int rc = kstrtouint(buf, 0, &ls->ls_global_id);
if (rc)
return rc;
return len; return len;
} }
...@@ -81,7 +90,11 @@ static ssize_t dlm_nodir_show(struct dlm_ls *ls, char *buf) ...@@ -81,7 +90,11 @@ static ssize_t dlm_nodir_show(struct dlm_ls *ls, char *buf)
static ssize_t dlm_nodir_store(struct dlm_ls *ls, const char *buf, size_t len) static ssize_t dlm_nodir_store(struct dlm_ls *ls, const char *buf, size_t len)
{ {
int val = simple_strtoul(buf, NULL, 0); int val;
int rc = kstrtoint(buf, 0, &val);
if (rc)
return rc;
if (val == 1) if (val == 1)
set_bit(LSFL_NODIR, &ls->ls_flags); set_bit(LSFL_NODIR, &ls->ls_flags);
return len; return len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment