提交 6583eb3d 编写于 作者: V Vu Pham 提交者: 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: NVu Pham <vu@mellanox.com>
Signed-off-by: NMichael S. Tsirkin <mst@mellanox.co.il>
Acked-by: NRoland Dreier <rolandd@cisco.com>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册