Skip to content

Commit

Permalink
staging/lustre/ptlrpc: fix ptlrpc_stop_pinger logic
Browse files Browse the repository at this point in the history
It was introduced due to a patch hunk when porting
commit 2080205 (staging/lustre/ptlrpc: race in pinger).

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Cc: stable <stable@vger.kernel.org> # 3.12
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Peng Tao authored and Greg Kroah-Hartman committed Nov 25, 2013
1 parent 9ecfc0f commit b39f15c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/lustre/lustre/ptlrpc/pinger.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ int ptlrpc_stop_pinger(void)
struct l_wait_info lwi = { 0 };
int rc = 0;

if (!thread_is_init(&pinger_thread) &&
!thread_is_stopped(&pinger_thread))
if (thread_is_init(&pinger_thread) ||
thread_is_stopped(&pinger_thread))
return -EALREADY;

ptlrpc_pinger_remove_timeouts();
Expand Down

0 comments on commit b39f15c

Please sign in to comment.