Skip to content

Commit 65e6757

Browse files
Kautuk Consulgregkh
authored andcommitted
devtmpfsd: fix task state handling
- Set the state to TASK_INTERRUPTIBLE using __set_current_state() instead of set_current_state() as the spin_unlock is an implicit memory barrier. - After return from schedule(), there is no need to set the current state to TASK_RUNNING - a call to schedule() always returns in TASK_RUNNING state. Signed-off-by: Kautuk Consul <consul.kautuk@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent 72f8c0b commit 65e6757

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎drivers/base/devtmpfs.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,10 +413,9 @@ static int devtmpfsd(void *p)
413413
}
414414
spin_lock(&req_lock);
415415
}
416-
set_current_state(TASK_INTERRUPTIBLE);
416+
__set_current_state(TASK_INTERRUPTIBLE);
417417
spin_unlock(&req_lock);
418418
schedule();
419-
__set_current_state(TASK_RUNNING);
420419
}
421420
return 0;
422421
out:

0 commit comments

Comments
 (0)