]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - drivers/block/xen-blkback/blkback.c
xen-blkback: don't "handle" error by BUG()
[mirror_ubuntu-hirsute-kernel.git] / drivers / block / xen-blkback / blkback.c
index 9ebf53903d7bf03eae935f733ab1a78a4b93f3f5..ee62b3c0b55ab3c9abb425c28b183d6a91abd886 100644 (file)
@@ -811,10 +811,8 @@ again:
                        break;
        }
 
-       if (segs_to_map) {
+       if (segs_to_map)
                ret = gnttab_map_refs(map, NULL, pages_to_gnt, segs_to_map);
-               BUG_ON(ret);
-       }
 
        /*
         * Now swizzle the MFN in our domain with the MFN from the other domain
@@ -830,7 +828,7 @@ again:
                                gnttab_page_cache_put(&ring->free_pages,
                                                      &pages[seg_idx]->page, 1);
                                pages[seg_idx]->handle = BLKBACK_INVALID_HANDLE;
-                               ret |= 1;
+                               ret |= !ret;
                                goto next;
                        }
                        pages[seg_idx]->handle = map[new_map_idx].handle;