aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-12-23 15:21:53 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-12-23 15:21:53 -0500
commitbd7bf9d540c001055fba796ebf146d90e4dd2eb2 (patch)
tree29f49d2244d390055126280903e9d647e10cdbd8
parent9082a5cc1e33d081f091f54e6ed69a0628a4bdcc (diff)
NFSv4: Convert delegation->type field to fmode_t
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--fs/nfs/delegation.c2
-rw-r--r--fs/nfs/delegation.h6
-rw-r--r--fs/nfs/nfs4xdr.c4
-rw-r--r--include/linux/nfs_fs.h2
-rw-r--r--include/linux/nfs_xdr.h4
5 files changed, 9 insertions, 9 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index e75f2f8c5245..968225a88015 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -48,7 +48,7 @@ void nfs_mark_delegation_referenced(struct nfs_delegation *delegation)
48 set_bit(NFS_DELEGATION_REFERENCED, &delegation->flags); 48 set_bit(NFS_DELEGATION_REFERENCED, &delegation->flags);
49} 49}
50 50
51int nfs_have_delegation(struct inode *inode, int flags) 51int nfs_have_delegation(struct inode *inode, fmode_t flags)
52{ 52{
53 struct nfs_delegation *delegation; 53 struct nfs_delegation *delegation;
54 int ret = 0; 54 int ret = 0;
diff --git a/fs/nfs/delegation.h b/fs/nfs/delegation.h
index 2a74882e5d50..09f383795174 100644
--- a/fs/nfs/delegation.h
+++ b/fs/nfs/delegation.h
@@ -17,7 +17,7 @@ struct nfs_delegation {
17 struct rpc_cred *cred; 17 struct rpc_cred *cred;
18 struct inode *inode; 18 struct inode *inode;
19 nfs4_stateid stateid; 19 nfs4_stateid stateid;
20 int type; 20 fmode_t type;
21 loff_t maxsize; 21 loff_t maxsize;
22 __u64 change_attr; 22 __u64 change_attr;
23 unsigned long flags; 23 unsigned long flags;
@@ -54,10 +54,10 @@ int nfs4_lock_delegation_recall(struct nfs4_state *state, struct file_lock *fl);
54int nfs4_copy_delegation_stateid(nfs4_stateid *dst, struct inode *inode); 54int nfs4_copy_delegation_stateid(nfs4_stateid *dst, struct inode *inode);
55 55
56void nfs_mark_delegation_referenced(struct nfs_delegation *delegation); 56void nfs_mark_delegation_referenced(struct nfs_delegation *delegation);
57int nfs_have_delegation(struct inode *inode, int flags); 57int nfs_have_delegation(struct inode *inode, fmode_t flags);
58 58
59#else 59#else
60static inline int nfs_have_delegation(struct inode *inode, int flags) 60static inline int nfs_have_delegation(struct inode *inode, fmode_t flags)
61{ 61{
62 return 0; 62 return 0;
63} 63}
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index b916297d2334..879911c99030 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -1024,7 +1024,7 @@ static void encode_opentype(struct xdr_stream *xdr, const struct nfs_openargs *a
1024 } 1024 }
1025} 1025}
1026 1026
1027static inline void encode_delegation_type(struct xdr_stream *xdr, int delegation_type) 1027static inline void encode_delegation_type(struct xdr_stream *xdr, fmode_t delegation_type)
1028{ 1028{
1029 __be32 *p; 1029 __be32 *p;
1030 1030
@@ -1053,7 +1053,7 @@ static inline void encode_claim_null(struct xdr_stream *xdr, const struct qstr *
1053 encode_string(xdr, name->len, name->name); 1053 encode_string(xdr, name->len, name->name);
1054} 1054}
1055 1055
1056static inline void encode_claim_previous(struct xdr_stream *xdr, int type) 1056static inline void encode_claim_previous(struct xdr_stream *xdr, fmode_t type)
1057{ 1057{
1058 __be32 *p; 1058 __be32 *p;
1059 1059
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index f11077285a6c..8d71d7b7c78a 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -180,7 +180,7 @@ struct nfs_inode {
180 /* NFSv4 state */ 180 /* NFSv4 state */
181 struct list_head open_states; 181 struct list_head open_states;
182 struct nfs_delegation *delegation; 182 struct nfs_delegation *delegation;
183 int delegation_state; 183 fmode_t delegation_state;
184 struct rw_semaphore rwsem; 184 struct rw_semaphore rwsem;
185#endif /* CONFIG_NFS_V4*/ 185#endif /* CONFIG_NFS_V4*/
186 struct inode vfs_inode; 186 struct inode vfs_inode;
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index c1c31acb8a2b..32c1a0ecdbff 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -126,7 +126,7 @@ struct nfs_openargs {
126 struct iattr * attrs; /* UNCHECKED, GUARDED */ 126 struct iattr * attrs; /* UNCHECKED, GUARDED */
127 nfs4_verifier verifier; /* EXCLUSIVE */ 127 nfs4_verifier verifier; /* EXCLUSIVE */
128 nfs4_stateid delegation; /* CLAIM_DELEGATE_CUR */ 128 nfs4_stateid delegation; /* CLAIM_DELEGATE_CUR */
129 int delegation_type; /* CLAIM_PREVIOUS */ 129 fmode_t delegation_type; /* CLAIM_PREVIOUS */
130 } u; 130 } u;
131 const struct qstr * name; 131 const struct qstr * name;
132 const struct nfs_server *server; /* Needed for ID mapping */ 132 const struct nfs_server *server; /* Needed for ID mapping */
@@ -143,7 +143,7 @@ struct nfs_openres {
143 struct nfs_fattr * dir_attr; 143 struct nfs_fattr * dir_attr;
144 struct nfs_seqid * seqid; 144 struct nfs_seqid * seqid;
145 const struct nfs_server *server; 145 const struct nfs_server *server;
146 int delegation_type; 146 fmode_t delegation_type;
147 nfs4_stateid delegation; 147 nfs4_stateid delegation;
148 __u32 do_recall; 148 __u32 do_recall;
149 __u64 maxsize; 149 __u64 maxsize;