diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-20 13:44:39 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-20 13:44:39 -0500 |
commit | 6849c0cab69f5d1a0fc7b05fa5bfb3dec53f86df (patch) | |
tree | 8bf595be663cc641b000846737c3ba1b6419eb6a /include/linux/lockd | |
parent | 09c7938c5640a6f22bef074ca6b803dccfdb93e3 (diff) | |
download | talos-obmc-linux-6849c0cab69f5d1a0fc7b05fa5bfb3dec53f86df.tar.gz talos-obmc-linux-6849c0cab69f5d1a0fc7b05fa5bfb3dec53f86df.zip |
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.h | 3 |
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 @@ #include <linux/config.h> #include <linux/in.h> #include <linux/fs.h> +#include <linux/kref.h> #include <linux/utsname.h> #include <linux/nfsd/nfsfh.h> #include <linux/lockd/bind.h> @@ -110,6 +111,7 @@ struct nlm_file { */ #define NLM_NEVER (~(unsigned long) 0) struct nlm_block { + struct kref b_count; /* Reference count */ struct nlm_block * b_next; /* linked list (all blocks) */ struct nlm_block * b_fnext; /* linked list (per file) */ struct nlm_rqst b_call; /* RPC args & callback info */ @@ -119,7 +121,6 @@ struct nlm_block { unsigned int b_id; /* block id */ unsigned char b_queued; /* re-queued */ unsigned char b_granted; /* VFS granted lock */ - unsigned char b_incall; /* doing callback */ unsigned char b_done; /* callback complete */ struct nlm_file * b_file; /* file in question */ }; |