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

[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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}