diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-09 09:40:27 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-09 09:40:27 -0400 |
commit | 28df955a2ad484d602314b30183ea8496a9aa34a (patch) | |
tree | c62632b2a0a49df114283f10764244c1b1b5f506 /include/linux | |
parent | 5046791417dcac1ba126b77b8062af15a2f0b8e1 (diff) | |
download | op-kernel-dev-28df955a2ad484d602314b30183ea8496a9aa34a.zip op-kernel-dev-28df955a2ad484d602314b30183ea8496a9aa34a.tar.gz |
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>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/lockd/lockd.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index a6c1a33..6b26847 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h @@ -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 */ |