From: Keir Fraser Date: Wed, 17 Nov 2010 17:16:52 +0000 (+0000) Subject: blktap2: fix after c/s 1035 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b2dfdf0c0eb3d88e5e6e4d3f5fdd6ea117261197;p=legacy%2Flinux-2.6.18-xen.git blktap2: fix after c/s 1035 The grant handle must be invalidated only in the error path. Signed-off-by: Jan Beulich Acked-by: Olaf Hering --- diff --git a/drivers/xen/blktap2/device.c b/drivers/xen/blktap2/device.c index bdaade8d..6424994c 100644 --- a/drivers/xen/blktap2/device.c +++ b/drivers/xen/blktap2/device.c @@ -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++; }