aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/lockd
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-24 14:46:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-24 14:46:16 -0400
commit563307b2fa15d687abc54bd980b9847ebf0e3231 (patch)
tree7f16be30217a2e66360ede97aa27d07a4ebd7e55 /include/linux/lockd
parent10c993a6b5418cb1026775765ba4c70ffb70853d (diff)
parent233607dbbc823caf685e778cabc49fb7f679900b (diff)
Merge git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (80 commits) SUNRPC: Invalidate the RPCSEC_GSS session if the server dropped the request make nfs_automount_list static NFS: remove duplicate flags assignment from nfs_validate_mount_data NFS - fix potential NULL pointer dereference v2 SUNRPC: Don't change the RPCSEC_GSS context on a credential that is in use SUNRPC: Fix a race in gss_refresh_upcall() SUNRPC: Don't disconnect more than once if retransmitting NFSv4 requests SUNRPC: Remove the unused export of xprt_force_disconnect SUNRPC: remove XS_SENDMSG_RETRY SUNRPC: Protect creds against early garbage collection NFSv4: Attempt to use machine credentials in SETCLIENTID calls NFSv4: Reintroduce machine creds NFSv4: Don't use cred->cr_ops->cr_name in nfs4_proc_setclientid() nfs: fix printout of multiword bitfields nfs: return negative error value from nfs{,4}_stat_to_errno NLM/lockd: Ensure client locking calls use correct credentials NFS: Remove the buggy lock-if-signalled case from do_setlk() NLM/lockd: Fix a race when cancelling a blocking lock NLM/lockd: Ensure that nlmclnt_cancel() returns results of the CANCEL call NLM: Remove the signal masking in nlmclnt_proc/nlmclnt_cancel ...
Diffstat (limited to 'include/linux/lockd')
-rw-r--r--include/linux/lockd/lockd.h18
-rw-r--r--include/linux/lockd/sm_inter.h1
2 files changed, 11 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
diff --git a/include/linux/lockd/sm_inter.h b/include/linux/lockd/sm_inter.h
index 22a645828f26..5a5448bdb17d 100644
--- a/include/linux/lockd/sm_inter.h
+++ b/include/linux/lockd/sm_inter.h
@@ -19,6 +19,7 @@
19#define SM_NOTIFY 6 19#define SM_NOTIFY 6
20 20
21#define SM_MAXSTRLEN 1024 21#define SM_MAXSTRLEN 1024
22#define SM_PRIV_SIZE 16
22 23
23/* 24/*
24 * Arguments for all calls to statd 25 * Arguments for all calls to statd