]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commitdiff
blktap2: fix after c/s 1035
authorKeir Fraser <keir@xen.org>
Wed, 17 Nov 2010 17:16:52 +0000 (17:16 +0000)
committerKeir Fraser <keir@xen.org>
Wed, 17 Nov 2010 17:16:52 +0000 (17:16 +0000)
The grant handle must be invalidated only in the error path.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Olaf Hering <olaf@aepfle.de>
drivers/xen/blktap2/device.c

index bdaade8d3d0be931e722df6db667f0f1a1244b58..6424994cfe70cfa6d388125c8024c2c8626b750f 100644 (file)
@@ -523,8 +523,8 @@ blktap_map_foreign(struct blktap *tap,
                                WARN_ON(table->grants[grant].status == GNTST_eagain);
                                BTERR("invalid user buffer: could not remap it\n");
                                err |= 1;
+                               table->grants[grant].handle = INVALID_GRANT_HANDLE;
                        }
-                       table->grants[grant].handle = INVALID_GRANT_HANDLE;
                        request->handles[i].user = table->grants[grant].handle;
                        grant++;
                }