diff options
Diffstat (limited to 'net/sunrpc/auth_gss/svcauth_gss.c')
-rw-r--r-- | net/sunrpc/auth_gss/svcauth_gss.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index 4d7eb9e704da..d51e316c5821 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c | |||
@@ -1122,18 +1122,20 @@ svcauth_gss_release(struct svc_rqst *rqstp) | |||
1122 | integ_len)) | 1122 | integ_len)) |
1123 | BUG(); | 1123 | BUG(); |
1124 | if (resbuf->page_len == 0 | 1124 | if (resbuf->page_len == 0 |
1125 | && resbuf->tail[0].iov_len + RPC_MAX_AUTH_SIZE | 1125 | && resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE |
1126 | < PAGE_SIZE) { | 1126 | < PAGE_SIZE) { |
1127 | BUG_ON(resbuf->tail[0].iov_len); | 1127 | BUG_ON(resbuf->tail[0].iov_len); |
1128 | /* Use head for everything */ | 1128 | /* Use head for everything */ |
1129 | resv = &resbuf->head[0]; | 1129 | resv = &resbuf->head[0]; |
1130 | } else if (resbuf->tail[0].iov_base == NULL) { | 1130 | } else if (resbuf->tail[0].iov_base == NULL) { |
1131 | /* copied from nfsd4_encode_read */ | 1131 | if (resbuf->head[0].iov_len + RPC_MAX_AUTH_SIZE |
1132 | svc_take_page(rqstp); | 1132 | > PAGE_SIZE) |
1133 | resbuf->tail[0].iov_base = page_address(rqstp | 1133 | goto out_err; |
1134 | ->rq_respages[rqstp->rq_resused-1]); | 1134 | resbuf->tail[0].iov_base = |
1135 | rqstp->rq_restailpage = rqstp->rq_resused-1; | 1135 | resbuf->head[0].iov_base |
1136 | + resbuf->head[0].iov_len; | ||
1136 | resbuf->tail[0].iov_len = 0; | 1137 | resbuf->tail[0].iov_len = 0; |
1138 | rqstp->rq_restailpage = 0; | ||
1137 | resv = &resbuf->tail[0]; | 1139 | resv = &resbuf->tail[0]; |
1138 | } else { | 1140 | } else { |
1139 | resv = &resbuf->tail[0]; | 1141 | resv = &resbuf->tail[0]; |