]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/block/xen-blkfront.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[karo-tx-linux.git] / drivers / block / xen-blkfront.c
index d3c1a9523d1f94408b094363360d052183792e61..6d89ed35d80c0caaf8bf57ba82c7e9f3a9194bb9 100644 (file)
@@ -1074,12 +1074,6 @@ static void blkif_completion(struct blk_shadow *s, struct blkfront_info *info,
                s->req.u.indirect.nr_segments : s->req.u.rw.nr_segments;
 
        if (bret->operation == BLKIF_OP_READ && info->feature_persistent) {
-               /*
-                * Copy the data received from the backend into the bvec.
-                * Since bv_offset can be different than 0, and bv_len different
-                * than PAGE_SIZE, we have to keep track of the current offset,
-                * to be sure we are copying the data from the right shared page.
-                */
                for_each_sg(s->sg, sg, nseg, i) {
                        BUG_ON(sg->offset + sg->length > PAGE_SIZE);
                        shared_data = kmap_atomic(
@@ -1951,6 +1945,8 @@ static void blkback_changed(struct xenbus_device *dev,
 
        switch (backend_state) {
        case XenbusStateInitWait:
+               if (dev->state != XenbusStateInitialising)
+                       break;
                if (talk_to_blkback(dev, info)) {
                        kfree(info);
                        dev_set_drvdata(&dev->dev, NULL);