aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/lockd/lockd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/lockd/lockd.h')
-rw-r--r--include/linux/lockd/lockd.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index 4babb2a129ac..94649a8da014 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -91,6 +91,7 @@ struct nlm_wait;
91 */ 91 */
92#define NLMCLNT_OHSIZE ((__NEW_UTS_LEN) + 10u) 92#define NLMCLNT_OHSIZE ((__NEW_UTS_LEN) + 10u)
93struct nlm_rqst { 93struct nlm_rqst {
94 atomic_t a_count;
94 unsigned int a_flags; /* initial RPC task flags */ 95 unsigned int a_flags; /* initial RPC task flags */
95 struct nlm_host * a_host; /* host handle */ 96 struct nlm_host * a_host; /* host handle */
96 struct nlm_args a_args; /* arguments */ 97 struct nlm_args a_args; /* arguments */
@@ -173,8 +174,10 @@ void nlmclnt_next_cookie(struct nlm_cookie *);
173/* 174/*
174 * Host cache 175 * Host cache
175 */ 176 */
176struct nlm_host *nlmclnt_lookup_host(const struct sockaddr_in *, int, int, 177struct nlm_host *nlmclnt_lookup_host(const struct sockaddr_in *sin,
177 const char *, unsigned int); 178 int proto, u32 version,
179 const char *hostname,
180 unsigned int hostname_len);
178struct nlm_host *nlmsvc_lookup_host(struct svc_rqst *, const char *, 181struct nlm_host *nlmsvc_lookup_host(struct svc_rqst *, const char *,
179 unsigned int); 182 unsigned int);
180struct rpc_clnt * nlm_bind_host(struct nlm_host *); 183struct rpc_clnt * nlm_bind_host(struct nlm_host *);
@@ -217,8 +220,7 @@ void nlmsvc_mark_resources(void);
217void nlmsvc_free_host_resources(struct nlm_host *); 220void nlmsvc_free_host_resources(struct nlm_host *);
218void nlmsvc_invalidate_all(void); 221void nlmsvc_invalidate_all(void);
219 222
220static __inline__ struct inode * 223static inline struct inode *nlmsvc_file_inode(struct nlm_file *file)
221nlmsvc_file_inode(struct nlm_file *file)
222{ 224{
223 return file->f_file->f_path.dentry->d_inode; 225 return file->f_file->f_path.dentry->d_inode;
224} 226}
@@ -226,8 +228,8 @@ nlmsvc_file_inode(struct nlm_file *file)
226/* 228/*
227 * Compare two host addresses (needs modifying for ipv6) 229 * Compare two host addresses (needs modifying for ipv6)
228 */ 230 */
229static __inline__ int 231static inline int nlm_cmp_addr(const struct sockaddr_in *sin1,
230nlm_cmp_addr(const struct sockaddr_in *sin1, const struct sockaddr_in *sin2) 232 const struct sockaddr_in *sin2)
231{ 233{
232 return sin1->sin_addr.s_addr == sin2->sin_addr.s_addr; 234 return sin1->sin_addr.s_addr == sin2->sin_addr.s_addr;
233} 235}
@@ -236,8 +238,8 @@ nlm_cmp_addr(const struct sockaddr_in *sin1, const struct sockaddr_in *sin2)
236 * Compare two NLM locks. 238 * Compare two NLM locks.
237 * When the second lock is of type F_UNLCK, this acts like a wildcard. 239 * When the second lock is of type F_UNLCK, this acts like a wildcard.
238 */ 240 */
239static __inline__ int 241static inline int nlm_compare_locks(const struct file_lock *fl1,
240nlm_compare_locks(const struct file_lock *fl1, const struct file_lock *fl2) 242 const struct file_lock *fl2)
241{ 243{
242 return fl1->fl_pid == fl2->fl_pid 244 return fl1->fl_pid == fl2->fl_pid
243 && fl1->fl_owner == fl2->fl_owner 245 && fl1->fl_owner == fl2->fl_owner