diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-10 23:04:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-10 23:04:59 -0400 |
commit | cf596766fc53bbfa0e2b21e3569932aa54f5f9ca (patch) | |
tree | 6e88bae48c06f5b4a099989abb04178b939d2b24 /include/linux/sunrpc | |
parent | 516f7b3f2a7dbe93d3075e76a06bbfcd0c0ee4f7 (diff) | |
parent | d4a516560fc96a9d486a9939bcb567e3fdce8f49 (diff) |
Merge branch 'nfsd-next' of git://linux-nfs.org/~bfields/linux
Pull nfsd updates from Bruce Fields:
"This was a very quiet cycle! Just a few bugfixes and some cleanup"
* 'nfsd-next' of git://linux-nfs.org/~bfields/linux:
rpc: let xdr layer allocate gssproxy receieve pages
rpc: fix huge kmalloc's in gss-proxy
rpc: comment on linux_cred encoding, treat all as unsigned
rpc: clean up decoding of gssproxy linux creds
svcrpc: remove unused rq_resused
nfsd4: nfsd4_create_clid_dir prints uninitialized data
nfsd4: fix leak of inode reference on delegation failure
Revert "nfsd: nfs4_file_get_access: need to be more careful with O_RDWR"
sunrpc: prepare NFS for 2038
nfsd4: fix setlease error return
nfsd: nfs4_file_get_access: need to be more careful with O_RDWR
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/cache.h | 22 | ||||
-rw-r--r-- | include/linux/sunrpc/svc.h | 1 |
2 files changed, 20 insertions, 3 deletions
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 6ce690de447f..437ddb6c4aef 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -264,12 +264,30 @@ static inline int get_uint(char **bpp, unsigned int *anint) | |||
264 | return 0; | 264 | return 0; |
265 | } | 265 | } |
266 | 266 | ||
267 | static inline int get_time(char **bpp, time_t *time) | ||
268 | { | ||
269 | char buf[50]; | ||
270 | long long ll; | ||
271 | int len = qword_get(bpp, buf, sizeof(buf)); | ||
272 | |||
273 | if (len < 0) | ||
274 | return -EINVAL; | ||
275 | if (len == 0) | ||
276 | return -ENOENT; | ||
277 | |||
278 | if (kstrtoll(buf, 0, &ll)) | ||
279 | return -EINVAL; | ||
280 | |||
281 | *time = (time_t)ll; | ||
282 | return 0; | ||
283 | } | ||
284 | |||
267 | static inline time_t get_expiry(char **bpp) | 285 | static inline time_t get_expiry(char **bpp) |
268 | { | 286 | { |
269 | int rv; | 287 | time_t rv; |
270 | struct timespec boot; | 288 | struct timespec boot; |
271 | 289 | ||
272 | if (get_int(bpp, &rv)) | 290 | if (get_time(bpp, &rv)) |
273 | return 0; | 291 | return 0; |
274 | if (rv < 0) | 292 | if (rv < 0) |
275 | return 0; | 293 | return 0; |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 1f0216b9a6c9..6eecfc2e4f98 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -243,7 +243,6 @@ struct svc_rqst { | |||
243 | struct xdr_buf rq_res; | 243 | struct xdr_buf rq_res; |
244 | struct page * rq_pages[RPCSVC_MAXPAGES]; | 244 | struct page * rq_pages[RPCSVC_MAXPAGES]; |
245 | struct page * *rq_respages; /* points into rq_pages */ | 245 | struct page * *rq_respages; /* points into rq_pages */ |
246 | int rq_resused; /* number of pages used for result */ | ||
247 | struct page * *rq_next_page; /* next reply page to use */ | 246 | struct page * *rq_next_page; /* next reply page to use */ |
248 | 247 | ||
249 | struct kvec rq_vec[RPCSVC_MAXPAGES]; /* generally useful.. */ | 248 | struct kvec rq_vec[RPCSVC_MAXPAGES]; /* generally useful.. */ |