diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-08 21:28:14 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-08 21:28:14 -0400 |
| commit | 75ff24fa52f0cc512ceee4c377632b91a3a80811 (patch) | |
| tree | 1b4a7a17c203221afb12027834c62679017655bb /include/linux/sunrpc | |
| parent | 0f386a7074aa758720a4fc1fa26123044849bcc6 (diff) | |
| parent | 06f9cc12caa862f5bc86ebdb4f77568a4bef0167 (diff) | |
Merge branch 'for-3.15' of git://linux-nfs.org/~bfields/linux
Pull nfsd updates from Bruce Fields:
"Highlights:
- server-side nfs/rdma fixes from Jeff Layton and Tom Tucker
- xdr fixes (a larger xdr rewrite has been posted but I decided it
would be better to queue it up for 3.16).
- miscellaneous fixes and cleanup from all over (thanks especially to
Kinglong Mee)"
* 'for-3.15' of git://linux-nfs.org/~bfields/linux: (36 commits)
nfsd4: don't create unnecessary mask acl
nfsd: revert v2 half of "nfsd: don't return high mode bits"
nfsd4: fix memory leak in nfsd4_encode_fattr()
nfsd: check passed socket's net matches NFSd superblock's one
SUNRPC: Clear xpt_bc_xprt if xs_setup_bc_tcp failed
NFSD/SUNRPC: Check rpc_xprt out of xs_setup_bc_tcp
SUNRPC: New helper for creating client with rpc_xprt
NFSD: Free backchannel xprt in bc_destroy
NFSD: Clear wcc data between compound ops
nfsd: Don't return NFS4ERR_STALE_STATEID for NFSv4.1+
nfsd4: fix nfs4err_resource in 4.1 case
nfsd4: fix setclientid encode size
nfsd4: remove redundant check from nfsd4_check_resp_size
nfsd4: use more generous NFS4_ACL_MAX
nfsd4: minor nfsd4_replay_cache_entry cleanup
nfsd4: nfsd4_replay_cache_entry should be static
nfsd4: update comments with obsolete function name
rpc: Allow xdr_buf_subsegment to operate in-place
NFSD: Using free_conn free connection
SUNRPC: fix memory leak of peer addresses in XPRT
...
Diffstat (limited to 'include/linux/sunrpc')
| -rw-r--r-- | include/linux/sunrpc/clnt.h | 2 | ||||
| -rw-r--r-- | include/linux/sunrpc/svcsock.h | 1 | ||||
| -rw-r--r-- | include/linux/sunrpc/xprt.h | 13 |
3 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 8af2804bab16..70736b98c721 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
| @@ -130,6 +130,8 @@ struct rpc_create_args { | |||
| 130 | #define RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT (1UL << 9) | 130 | #define RPC_CLNT_CREATE_NO_RETRANS_TIMEOUT (1UL << 9) |
| 131 | 131 | ||
| 132 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); | 132 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); |
| 133 | struct rpc_clnt *rpc_create_xprt(struct rpc_create_args *args, | ||
| 134 | struct rpc_xprt *xprt); | ||
| 133 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, | 135 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, |
| 134 | const struct rpc_program *, u32); | 136 | const struct rpc_program *, u32); |
| 135 | void rpc_task_reset_client(struct rpc_task *task, struct rpc_clnt *clnt); | 137 | void rpc_task_reset_client(struct rpc_task *task, struct rpc_clnt *clnt); |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index 62fd1b756e99..947009ed5996 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
| @@ -56,6 +56,7 @@ int svc_recv(struct svc_rqst *, long); | |||
| 56 | int svc_send(struct svc_rqst *); | 56 | int svc_send(struct svc_rqst *); |
| 57 | void svc_drop(struct svc_rqst *); | 57 | void svc_drop(struct svc_rqst *); |
| 58 | void svc_sock_update_bufs(struct svc_serv *serv); | 58 | void svc_sock_update_bufs(struct svc_serv *serv); |
| 59 | bool svc_alien_sock(struct net *net, int fd); | ||
| 59 | int svc_addsock(struct svc_serv *serv, const int fd, | 60 | int svc_addsock(struct svc_serv *serv, const int fd, |
| 60 | char *name_return, const size_t len); | 61 | char *name_return, const size_t len); |
| 61 | void svc_init_xprt_sock(void); | 62 | void svc_init_xprt_sock(void); |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 8097b9df6773..3e5efb2b236e 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
| @@ -295,13 +295,24 @@ int xprt_adjust_timeout(struct rpc_rqst *req); | |||
| 295 | void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task); | 295 | void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task); |
| 296 | void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); | 296 | void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); |
| 297 | void xprt_release(struct rpc_task *task); | 297 | void xprt_release(struct rpc_task *task); |
| 298 | struct rpc_xprt * xprt_get(struct rpc_xprt *xprt); | ||
| 299 | void xprt_put(struct rpc_xprt *xprt); | 298 | void xprt_put(struct rpc_xprt *xprt); |
| 300 | struct rpc_xprt * xprt_alloc(struct net *net, size_t size, | 299 | struct rpc_xprt * xprt_alloc(struct net *net, size_t size, |
| 301 | unsigned int num_prealloc, | 300 | unsigned int num_prealloc, |
| 302 | unsigned int max_req); | 301 | unsigned int max_req); |
| 303 | void xprt_free(struct rpc_xprt *); | 302 | void xprt_free(struct rpc_xprt *); |
| 304 | 303 | ||
| 304 | /** | ||
| 305 | * xprt_get - return a reference to an RPC transport. | ||
| 306 | * @xprt: pointer to the transport | ||
| 307 | * | ||
| 308 | */ | ||
| 309 | static inline struct rpc_xprt *xprt_get(struct rpc_xprt *xprt) | ||
| 310 | { | ||
| 311 | if (atomic_inc_not_zero(&xprt->count)) | ||
| 312 | return xprt; | ||
| 313 | return NULL; | ||
| 314 | } | ||
| 315 | |||
| 305 | static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 *p) | 316 | static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 *p) |
| 306 | { | 317 | { |
| 307 | return p + xprt->tsh_size; | 318 | return p + xprt->tsh_size; |
