staging: lustre: statahead: set sai_index_wait with lli_sa_lock held
authorFan Yong <fan.yong@intel.com>
Sat, 3 Dec 2016 00:53:20 +0000 (19:53 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Dec 2016 09:54:33 +0000 (10:54 +0100)
commit3c8fb1b105cd48b1a509d83206bffa356afe359d
tree799088d97d16601f3982b77c7b4559cd8f3b48fb
parent817990ba1a1545875fed01a9014ac7f78dedf16d
staging: lustre: statahead: set sai_index_wait with lli_sa_lock held

It is the sponsor thread of the statahead thread to update the
sai::sai_index_wait. Originally, it didn't hold the lli_sa_lock
when did that. Becuase of out-of-order execution others may miss
to wakeup such thread.

On the other hand, if the statahead RPC gets failure, it should
wakeup the sponsor thread, not the statahead thread.

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Fan Yong <fan.yong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7828
Reviewed-on: http://review.whamcloud.com/18499
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/statahead.c