Commit:     2a428b2b8fe2c270a5889086ebe3ab914e3ea7d8
Parent:     c087567d3ffb2c7c61e091982e6ca45478394f1a
Author:     Chuck Lever <[EMAIL PROTECTED]>
AuthorDate: Fri Oct 26 13:30:43 2007 -0400
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 02:05:41 2008 -0500

    SUNRPC: Prevent mixed sign comparisons in rpcrdma_convert_iovs()
    Keep the type of the buffer position the same during iovec conversion to
    reduce the likelihood of unexpected results from comparisons and length
    Signed-off-by: Chuck Lever <[EMAIL PROTECTED]>
    Cc: Thomas Talpey <[EMAIL PROTECTED]>
    Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
 net/sunrpc/xprtrdma/rpc_rdma.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c
index 1aa1580..72c8eab 100644
--- a/net/sunrpc/xprtrdma/rpc_rdma.c
+++ b/net/sunrpc/xprtrdma/rpc_rdma.c
@@ -83,7 +83,7 @@ static const char transfertypes[][12] = {
 static int
-rpcrdma_convert_iovs(struct xdr_buf *xdrbuf, int pos,
+rpcrdma_convert_iovs(struct xdr_buf *xdrbuf, unsigned int pos,
        enum rpcrdma_chunktype type, struct rpcrdma_mr_seg *seg, int nsegs)
        int len, n = 0, p;
@@ -169,7 +169,7 @@ rpcrdma_create_chunks(struct rpc_rqst *rqst, struct xdr_buf 
        struct rpcrdma_req *req = rpcr_to_rdmar(rqst);
        struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(rqst->rq_task->tk_xprt);
        int nsegs, nchunks = 0;
-       int pos;
+       unsigned int pos;
        struct rpcrdma_mr_seg *seg = req->rl_segments;
        struct rpcrdma_read_chunk *cur_rchunk = NULL;
        struct rpcrdma_write_array *warray = NULL;
@@ -213,7 +213,7 @@ rpcrdma_create_chunks(struct rpc_rqst *rqst, struct xdr_buf 
                        dprintk("RPC:       %s: read chunk "
-                               "elem [EMAIL PROTECTED]:0x%x pos %d (%s)\n", 
+                               "elem [EMAIL PROTECTED]:0x%x pos %u (%s)\n", 
                                seg->mr_len, (unsigned long long)seg->mr_base,
                                seg->mr_rkey, pos, n < nsegs ? "more" : "last");
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to