struct lfsck_component *com;
struct l_wait_info lwi = { 0 };
struct lfsck_thread_args *lta;
- long rc = 0;
+ struct task_struct *task;
+ int rc = 0;
__u16 valid = 0;
__u16 flags = 0;
__u16 type = 1;
spin_lock(&lfsck->li_lock);
if (!thread_is_init(thread) && !thread_is_stopped(thread)) {
rc = -EALREADY;
+ if (unlikely(start == NULL)) {
+ spin_unlock(&lfsck->li_lock);
+ GOTO(out, rc);
+ }
+
while (start->ls_active != 0) {
if (!(type & start->ls_active)) {
type <<= 1;
GOTO(out, rc = PTR_ERR(lta));
__lfsck_set_speed(lfsck, bk->lb_speed_limit);
- rc = PTR_ERR(kthread_run(lfsck_master_engine, lta, "lfsck"));
- if (IS_ERR_VALUE(rc)) {
- CERROR("%s: cannot start LFSCK thread: rc = %ld\n",
+ task = kthread_run(lfsck_master_engine, lta, "lfsck");
+ if (IS_ERR(task)) {
+ rc = PTR_ERR(task);
+ CERROR("%s: cannot start LFSCK thread: rc = %d\n",
lfsck_lfsck2name(lfsck), rc);
lfsck_thread_args_fini(lta);