mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
[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@mellanox.com> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Acked-by: Roland Dreier <rolandd@cisco.com> Cc: Roland Dreier <rolandd@cisco.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
f0ee3404cc
commit
6583eb3dcc
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue