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 /net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | |
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 'net/sunrpc/xprtrdma/svc_rdma_recvfrom.c')
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c index 0ce75524ed21..8d904e4eef15 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | |||
@@ -90,6 +90,7 @@ static void rdma_build_arg_xdr(struct svc_rqst *rqstp, | |||
90 | sge_no++; | 90 | sge_no++; |
91 | } | 91 | } |
92 | rqstp->rq_respages = &rqstp->rq_pages[sge_no]; | 92 | rqstp->rq_respages = &rqstp->rq_pages[sge_no]; |
93 | rqstp->rq_next_page = rqstp->rq_respages + 1; | ||
93 | 94 | ||
94 | /* We should never run out of SGE because the limit is defined to | 95 | /* We should never run out of SGE because the limit is defined to |
95 | * support the max allowed RPC data length | 96 | * support the max allowed RPC data length |
@@ -169,6 +170,7 @@ static int map_read_chunks(struct svcxprt_rdma *xprt, | |||
169 | */ | 170 | */ |
170 | head->arg.pages[page_no] = rqstp->rq_arg.pages[page_no]; | 171 | head->arg.pages[page_no] = rqstp->rq_arg.pages[page_no]; |
171 | rqstp->rq_respages = &rqstp->rq_arg.pages[page_no+1]; | 172 | rqstp->rq_respages = &rqstp->rq_arg.pages[page_no+1]; |
173 | rqstp->rq_next_page = rqstp->rq_respages + 1; | ||
172 | 174 | ||
173 | byte_count -= sge_bytes; | 175 | byte_count -= sge_bytes; |
174 | ch_bytes -= sge_bytes; | 176 | ch_bytes -= sge_bytes; |
@@ -276,6 +278,7 @@ static int fast_reg_read_chunks(struct svcxprt_rdma *xprt, | |||
276 | 278 | ||
277 | /* rq_respages points one past arg pages */ | 279 | /* rq_respages points one past arg pages */ |
278 | rqstp->rq_respages = &rqstp->rq_arg.pages[page_no]; | 280 | rqstp->rq_respages = &rqstp->rq_arg.pages[page_no]; |
281 | rqstp->rq_next_page = rqstp->rq_respages + 1; | ||
279 | 282 | ||
280 | /* Create the reply and chunk maps */ | 283 | /* Create the reply and chunk maps */ |
281 | offset = 0; | 284 | offset = 0; |
@@ -520,13 +523,6 @@ next_sge: | |||
520 | for (ch_no = 0; &rqstp->rq_pages[ch_no] < rqstp->rq_respages; ch_no++) | 523 | for (ch_no = 0; &rqstp->rq_pages[ch_no] < rqstp->rq_respages; ch_no++) |
521 | rqstp->rq_pages[ch_no] = NULL; | 524 | rqstp->rq_pages[ch_no] = NULL; |
522 | 525 | ||
523 | /* | ||
524 | * Detach res pages. If svc_release sees any it will attempt to | ||
525 | * put them. | ||
526 | */ | ||
527 | while (rqstp->rq_next_page != rqstp->rq_respages) | ||
528 | *(--rqstp->rq_next_page) = NULL; | ||
529 | |||
530 | return err; | 526 | return err; |
531 | } | 527 | } |
532 | 528 | ||
@@ -550,7 +546,7 @@ static int rdma_read_complete(struct svc_rqst *rqstp, | |||
550 | 546 | ||
551 | /* rq_respages starts after the last arg page */ | 547 | /* rq_respages starts after the last arg page */ |
552 | rqstp->rq_respages = &rqstp->rq_arg.pages[page_no]; | 548 | rqstp->rq_respages = &rqstp->rq_arg.pages[page_no]; |
553 | rqstp->rq_next_page = &rqstp->rq_arg.pages[page_no]; | 549 | rqstp->rq_next_page = rqstp->rq_respages + 1; |
554 | 550 | ||
555 | /* Rebuild rq_arg head and tail. */ | 551 | /* Rebuild rq_arg head and tail. */ |
556 | rqstp->rq_arg.head[0] = head->arg.head[0]; | 552 | rqstp->rq_arg.head[0] = head->arg.head[0]; |