xprtrdma: Chunk list encoders must not return zero
Clean up, based on code audit: Remove the possibility that the chunk list XDR encoders can return zero, which would be interpreted as a NULL. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:

committed by
Anna Schumaker

vanhempi
7a89f9c626
commit
a54d4059e5
@@ -411,6 +411,8 @@ frwr_op_map(struct rpcrdma_xprt *r_xprt, struct rpcrdma_mr_seg *seg,
|
||||
}
|
||||
mw->mw_nents = i;
|
||||
mw->mw_dir = rpcrdma_data_dir(writing);
|
||||
if (i == 0)
|
||||
goto out_dmamap_err;
|
||||
|
||||
dma_nents = ib_dma_map_sg(ia->ri_device,
|
||||
mw->mw_sg, mw->mw_nents, mw->mw_dir);
|
||||
|
Viittaa uudesa ongelmassa
Block a user