[openib-general] [PATCH fixed] srp: fix fmr error handling
Michael S. Tsirkin
mst at mellanox.co.il
Mon Jul 10 15:10:11 PDT 2006
Sorry, the last patch I sent was corrupted, here's an updated version:
---
commit 7289361d5f81463e4abb27334773750279547e8a
Author: Vu Pham <vu at mellanox.com>
Date: Mon Jul 10 22:38:14 2006 +0300
[PATCH] srp: fix fmr error handling
srp_unmap_data assumes req->fmr is NULL if the request is not mapped,
so we must clean it out in case of an error.
Signed-off-by: Vu Pham <vu at mellanox.com>
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
Acked-by: Roland Dreier <rolandd at cisco.com>
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 4e22afe..6191180 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -618,6 +618,7 @@ static int srp_map_fmr(struct srp_device
dma_pages, page_cnt, &io_addr);
if (IS_ERR(req->fmr)) {
ret = PTR_ERR(req->fmr);
+ req->fmr = NULL;
goto out;
}
--
MST
More information about the general
mailing list