diff options
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/xenbus/xenbus_xs.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c index 0bd3d47ad24d..22f7cd711c57 100644 --- a/drivers/xen/xenbus/xenbus_xs.c +++ b/drivers/xen/xenbus/xenbus_xs.c | |||
@@ -232,10 +232,10 @@ static void transaction_resume(void) | |||
232 | void *xenbus_dev_request_and_reply(struct xsd_sockmsg *msg) | 232 | void *xenbus_dev_request_and_reply(struct xsd_sockmsg *msg) |
233 | { | 233 | { |
234 | void *ret; | 234 | void *ret; |
235 | struct xsd_sockmsg req_msg = *msg; | 235 | enum xsd_sockmsg_type type = msg->type; |
236 | int err; | 236 | int err; |
237 | 237 | ||
238 | if (req_msg.type == XS_TRANSACTION_START) | 238 | if (type == XS_TRANSACTION_START) |
239 | transaction_start(); | 239 | transaction_start(); |
240 | 240 | ||
241 | mutex_lock(&xs_state.request_mutex); | 241 | mutex_lock(&xs_state.request_mutex); |
@@ -250,8 +250,7 @@ void *xenbus_dev_request_and_reply(struct xsd_sockmsg *msg) | |||
250 | mutex_unlock(&xs_state.request_mutex); | 250 | mutex_unlock(&xs_state.request_mutex); |
251 | 251 | ||
252 | if ((msg->type == XS_TRANSACTION_END) || | 252 | if ((msg->type == XS_TRANSACTION_END) || |
253 | ((req_msg.type == XS_TRANSACTION_START) && | 253 | ((type == XS_TRANSACTION_START) && (msg->type == XS_ERROR))) |
254 | (msg->type == XS_ERROR))) | ||
255 | transaction_end(); | 254 | transaction_end(); |
256 | 255 | ||
257 | return ret; | 256 | return ret; |