aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/lockd
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-03-20 13:44:39 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-03-20 13:44:39 -0500
commit6849c0cab69f5d1a0fc7b05fa5bfb3dec53f86df (patch)
tree8bf595be663cc641b000846737c3ba1b6419eb6a /include/linux/lockd
parent09c7938c5640a6f22bef074ca6b803dccfdb93e3 (diff)
lockd: Add refcounting to struct nlm_block
Otherwise, the block may disappear from underneath us when in nlmsvc_retry_blocked. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/lockd')
-rw-r--r--include/linux/lockd/lockd.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index ef21ed296039..08ab9773f762 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -14,6 +14,7 @@
14#include <linux/config.h> 14#include <linux/config.h>
15#include <linux/in.h> 15#include <linux/in.h>
16#include <linux/fs.h> 16#include <linux/fs.h>
17#include <linux/kref.h>
17#include <linux/utsname.h> 18#include <linux/utsname.h>
18#include <linux/nfsd/nfsfh.h> 19#include <linux/nfsd/nfsfh.h>
19#include <linux/lockd/bind.h> 20#include <linux/lockd/bind.h>
@@ -110,6 +111,7 @@ struct nlm_file {
110 */ 111 */
111#define NLM_NEVER (~(unsigned long) 0) 112#define NLM_NEVER (~(unsigned long) 0)
112struct nlm_block { 113struct nlm_block {
114 struct kref b_count; /* Reference count */
113 struct nlm_block * b_next; /* linked list (all blocks) */ 115 struct nlm_block * b_next; /* linked list (all blocks) */
114 struct nlm_block * b_fnext; /* linked list (per file) */ 116 struct nlm_block * b_fnext; /* linked list (per file) */
115 struct nlm_rqst b_call; /* RPC args & callback info */ 117 struct nlm_rqst b_call; /* RPC args & callback info */
@@ -119,7 +121,6 @@ struct nlm_block {
119 unsigned int b_id; /* block id */ 121 unsigned int b_id; /* block id */
120 unsigned char b_queued; /* re-queued */ 122 unsigned char b_queued; /* re-queued */
121 unsigned char b_granted; /* VFS granted lock */ 123 unsigned char b_granted; /* VFS granted lock */
122 unsigned char b_incall; /* doing callback */
123 unsigned char b_done; /* callback complete */ 124 unsigned char b_done; /* callback complete */
124 struct nlm_file * b_file; /* file in question */ 125 struct nlm_file * b_file; /* file in question */
125}; 126};