diff options
Diffstat (limited to 'include/linux/lockd')
| -rw-r--r-- | include/linux/lockd/bind.h | 2 | ||||
| -rw-r--r-- | include/linux/lockd/lockd.h | 23 |
2 files changed, 21 insertions, 4 deletions
diff --git a/include/linux/lockd/bind.h b/include/linux/lockd/bind.h index 2a03cf135e1f..b054debef2e0 100644 --- a/include/linux/lockd/bind.h +++ b/include/linux/lockd/bind.h @@ -20,7 +20,7 @@ struct svc_rqst; struct nlmsvc_binding { u32 (*fopen)(struct svc_rqst *, struct nfs_fh *, - struct file *); + struct file **); void (*fclose)(struct file *); }; diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index e0db6e1d057e..5a173a673fc9 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h @@ -52,10 +52,25 @@ struct nlm_host { wait_queue_head_t h_gracewait; /* wait while reclaiming */ u32 h_state; /* pseudo-state counter */ u32 h_nsmstate; /* true remote NSM state */ - unsigned int h_count; /* reference count */ + u32 h_pidcount; /* Pseudopids */ + atomic_t h_count; /* reference count */ struct semaphore h_sema; /* mutex for pmap binding */ unsigned long h_nextrebind; /* next portmap call */ unsigned long h_expires; /* eligible for GC */ + struct list_head h_lockowners; /* Lockowners for the client */ + spinlock_t h_lock; +}; + +/* + * Map an fl_owner_t into a unique 32-bit "pid" + */ +struct nlm_lockowner { + struct list_head list; + atomic_t count; + + struct nlm_host *host; + fl_owner_t owner; + uint32_t pid; }; /* @@ -77,7 +92,7 @@ struct nlm_rqst { struct nlm_file { struct nlm_file * f_next; /* linked list */ struct nfs_fh f_handle; /* NFS file handle */ - struct file f_file; /* VFS file pointer */ + struct file * f_file; /* VFS file pointer */ struct nlm_share * f_shares; /* DOS shares */ struct nlm_block * f_blocks; /* blocked locks */ unsigned int f_locks; /* guesstimate # of locks */ @@ -180,7 +195,7 @@ void nlmsvc_invalidate_all(void); static __inline__ struct inode * nlmsvc_file_inode(struct nlm_file *file) { - return file->f_file.f_dentry->d_inode; + return file->f_file->f_dentry->d_inode; } /* @@ -205,6 +220,8 @@ nlm_compare_locks(struct file_lock *fl1, struct file_lock *fl2) &&(fl1->fl_type == fl2->fl_type || fl2->fl_type == F_UNLCK); } +extern struct lock_manager_operations nlmsvc_lock_operations; + #endif /* __KERNEL__ */ #endif /* LINUX_LOCKD_LOCKD_H */ |
