aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-12-17 16:36:17 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-12-17 16:36:17 -0500
commit2cc3a8f6ac0fb1e6095a47001d31aadcf9722bde (patch)
treeafcc572acff2548cdabdfb0ec488508e1864daf1 /net
parent23afc5c67588c92a062b4828a97b119755dffb51 (diff)
parent78f5815368837ae7e3a0d3709c9f95f74e4d8537 (diff)
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6
* git://git.linux-nfs.org/pub/linux/nfs-2.6: MAINTAINERS: update the NFS CLIENT entry NFS: Fix an Oops in NFS unmount Revert "NFS: Ensure we return zero if applications attempt to write zero bytes" SUNRPC xprtrdma: fix XDR tail buf marshalling for all ops NFSv2/v3: Fix a memory leak when using -onolock NFS: Fix NFS mountpoint crossing...
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/xprtrdma/rpc_rdma.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c
index 9e11ce715958..ee8de7af2a5b 100644
--- a/net/sunrpc/xprtrdma/rpc_rdma.c
+++ b/net/sunrpc/xprtrdma/rpc_rdma.c
@@ -92,7 +92,6 @@ rpcrdma_convert_iovs(struct xdr_buf *xdrbuf, int pos,
92 seg[n].mr_page = NULL; 92 seg[n].mr_page = NULL;
93 seg[n].mr_offset = xdrbuf->head[0].iov_base; 93 seg[n].mr_offset = xdrbuf->head[0].iov_base;
94 seg[n].mr_len = xdrbuf->head[0].iov_len; 94 seg[n].mr_len = xdrbuf->head[0].iov_len;
95 pos += xdrbuf->head[0].iov_len;
96 ++n; 95 ++n;
97 } 96 }
98 97
@@ -104,7 +103,6 @@ rpcrdma_convert_iovs(struct xdr_buf *xdrbuf, int pos,
104 seg[n].mr_len = min_t(u32, 103 seg[n].mr_len = min_t(u32,
105 PAGE_SIZE - xdrbuf->page_base, xdrbuf->page_len); 104 PAGE_SIZE - xdrbuf->page_base, xdrbuf->page_len);
106 len = xdrbuf->page_len - seg[n].mr_len; 105 len = xdrbuf->page_len - seg[n].mr_len;
107 pos += len;
108 ++n; 106 ++n;
109 p = 1; 107 p = 1;
110 while (len > 0) { 108 while (len > 0) {
@@ -119,20 +117,15 @@ rpcrdma_convert_iovs(struct xdr_buf *xdrbuf, int pos,
119 } 117 }
120 } 118 }
121 119
122 if (pos < xdrbuf->len && xdrbuf->tail[0].iov_len) { 120 if (xdrbuf->tail[0].iov_len) {
123 if (n == nsegs) 121 if (n == nsegs)
124 return 0; 122 return 0;
125 seg[n].mr_page = NULL; 123 seg[n].mr_page = NULL;
126 seg[n].mr_offset = xdrbuf->tail[0].iov_base; 124 seg[n].mr_offset = xdrbuf->tail[0].iov_base;
127 seg[n].mr_len = xdrbuf->tail[0].iov_len; 125 seg[n].mr_len = xdrbuf->tail[0].iov_len;
128 pos += xdrbuf->tail[0].iov_len;
129 ++n; 126 ++n;
130 } 127 }
131 128
132 if (pos < xdrbuf->len)
133 dprintk("RPC: %s: marshaled only %d of %d\n",
134 __func__, pos, xdrbuf->len);
135
136 return n; 129 return n;
137} 130}
138 131