NLM: Fix reclaim races
Currently it is possible for a task to remove its locks at the same time as the NLM recovery thread is trying to recover them. This quickly leads to an Oops. Protect the locks using an rw semaphore while they are being recovered. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
@@ -50,6 +50,7 @@ struct nlm_host {
|
||||
h_killed : 1,
|
||||
h_monitored : 1;
|
||||
wait_queue_head_t h_gracewait; /* wait while reclaiming */
|
||||
struct rw_semaphore h_rwsem; /* Reboot recovery lock */
|
||||
u32 h_state; /* pseudo-state counter */
|
||||
u32 h_nsmstate; /* true remote NSM state */
|
||||
u32 h_pidcount; /* Pseudopids */
|
||||
|
Reference in New Issue
Block a user