Commit 6583eb3d authored by Vu Pham's avatar Vu Pham Committed by Linus Torvalds

[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: default avatarVu Pham <vu@mellanox.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@mellanox.co.il>
Acked-by: default avatarRoland Dreier <rolandd@cisco.com>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f0ee3404
......@@ -618,6 +618,7 @@ static int srp_map_fmr(struct srp_device *dev, struct scatterlist *scat,
dma_pages, page_cnt, &io_addr);
if (IS_ERR(req->fmr)) {
ret = PTR_ERR(req->fmr);
req->fmr = NULL;
goto out;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment