diff --git a/fs/lustre/ptlrpc/lproc_ptlrpc.c b/fs/lustre/ptlrpc/lproc_ptlrpc.c index 6af3384..eb0ecc0 100644 --- a/fs/lustre/ptlrpc/lproc_ptlrpc.c +++ b/fs/lustre/ptlrpc/lproc_ptlrpc.c @@ -1303,13 +1303,13 @@ int lprocfs_wr_import(struct file *file, const char __user *buffer, ptr = strstr(uuid, "::"); if (ptr) { u32 inst; - char *endptr; + int rc; *ptr = 0; do_reconn = 0; ptr += strlen("::"); - inst = simple_strtoul(ptr, &endptr, 10); - if (*endptr) { + rc = kstrtouint(ptr, 10, &inst); + if (rc) { CERROR("config: wrong instance # %s\n", ptr); } else if (inst != imp->imp_connect_data.ocd_instance) { CDEBUG(D_INFO,