aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_fs.h
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2010-06-25 16:35:53 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-07-30 14:41:56 -0400
commitf11ac8db5d07b6e99d41ff4aa39d878ee5cef1c5 (patch)
tree4393cbc2653145ba3269d5143f5db7811a59698b /include/linux/nfs_fs.h
parent1f0e890dba5b0f543fea47732116b1c65d55614e (diff)
NFSv4: Ensure that we track the NFSv4 lock state in read/write requests.
This patch fixes bugzilla entry 14501: https://bugzilla.kernel.org/show_bug.cgi?id=14501 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/nfs_fs.h')
-rw-r--r--include/linux/nfs_fs.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 77c2ae53431c..a9d802615082 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -72,13 +72,20 @@ struct nfs_access_entry {
72 int mask; 72 int mask;
73}; 73};
74 74
75struct nfs_lock_context {
76 atomic_t count;
77 struct list_head list;
78 struct nfs_open_context *open_context;
79 fl_owner_t lockowner;
80 pid_t pid;
81};
82
75struct nfs4_state; 83struct nfs4_state;
76struct nfs_open_context { 84struct nfs_open_context {
77 atomic_t count; 85 struct nfs_lock_context lock_context;
78 struct path path; 86 struct path path;
79 struct rpc_cred *cred; 87 struct rpc_cred *cred;
80 struct nfs4_state *state; 88 struct nfs4_state *state;
81 fl_owner_t lockowner;
82 fmode_t mode; 89 fmode_t mode;
83 90
84 unsigned long flags; 91 unsigned long flags;
@@ -353,6 +360,8 @@ extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr);
353extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); 360extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx);
354extern void put_nfs_open_context(struct nfs_open_context *ctx); 361extern void put_nfs_open_context(struct nfs_open_context *ctx);
355extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, fmode_t mode); 362extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, fmode_t mode);
363extern struct nfs_lock_context *nfs_get_lock_context(struct nfs_open_context *ctx);
364extern void nfs_put_lock_context(struct nfs_lock_context *l_ctx);
356extern u64 nfs_compat_user_ino64(u64 fileid); 365extern u64 nfs_compat_user_ino64(u64 fileid);
357extern void nfs_fattr_init(struct nfs_fattr *fattr); 366extern void nfs_fattr_init(struct nfs_fattr *fattr);
358 367