mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
09c7938c56
commit
6849c0cab6
2 changed files with 47 additions and 50 deletions
|
@ -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 */
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue