aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/xprtsock.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 8b319e375049..897bdd982315 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -174,7 +174,6 @@ static inline int xs_sendpages(struct socket *sock, struct sockaddr *addr, int a
174 struct page **ppage = xdr->pages; 174 struct page **ppage = xdr->pages;
175 unsigned int len, pglen = xdr->page_len; 175 unsigned int len, pglen = xdr->page_len;
176 int err, ret = 0; 176 int err, ret = 0;
177 ssize_t (*sendpage)(struct socket *, struct page *, int, size_t, int);
178 177
179 if (unlikely(!sock)) 178 if (unlikely(!sock))
180 return -ENOTCONN; 179 return -ENOTCONN;
@@ -207,7 +206,6 @@ static inline int xs_sendpages(struct socket *sock, struct sockaddr *addr, int a
207 base &= ~PAGE_CACHE_MASK; 206 base &= ~PAGE_CACHE_MASK;
208 } 207 }
209 208
210 sendpage = kernel_sendpage;
211 do { 209 do {
212 int flags = XS_SENDMSG_FLAGS; 210 int flags = XS_SENDMSG_FLAGS;
213 211
@@ -220,10 +218,7 @@ static inline int xs_sendpages(struct socket *sock, struct sockaddr *addr, int a
220 if (pglen != len || xdr->tail[0].iov_len != 0) 218 if (pglen != len || xdr->tail[0].iov_len != 0)
221 flags |= MSG_MORE; 219 flags |= MSG_MORE;
222 220
223 /* Hmm... We might be dealing with highmem pages */ 221 err = kernel_sendpage(sock, *ppage, base, len, flags);
224 if (PageHighMem(*ppage))
225 sendpage = sock_no_sendpage;
226 err = sendpage(sock, *ppage, base, len, flags);
227 if (ret == 0) 222 if (ret == 0)
228 ret = err; 223 ret = err;
229 else if (err > 0) 224 else if (err > 0)