Skip to content

Commit

Permalink
Drivers: hv: vmbus: Don't wait after requesting offers
Browse files Browse the repository at this point in the history
commit 73cffdb upstream.

Don't wait after sending request for offers to the host. This wait is
unnecessary and simply adds 5 seconds to the boot time.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed May 13, 2015
1 parent 0fe8926 commit b583718
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/hv/channel_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,16 +648,14 @@ int vmbus_request_offers(void)
{
struct vmbus_channel_message_header *msg;
struct vmbus_channel_msginfo *msginfo;
int ret, t;
int ret;

msginfo = kmalloc(sizeof(*msginfo) +
sizeof(struct vmbus_channel_message_header),
GFP_KERNEL);
if (!msginfo)
return -ENOMEM;

init_completion(&msginfo->waitevent);

msg = (struct vmbus_channel_message_header *)msginfo->msg;

msg->msgtype = CHANNELMSG_REQUESTOFFERS;
Expand All @@ -671,14 +669,6 @@ int vmbus_request_offers(void)
goto cleanup;
}

t = wait_for_completion_timeout(&msginfo->waitevent, 5*HZ);
if (t == 0) {
ret = -ETIMEDOUT;
goto cleanup;
}



cleanup:
kfree(msginfo);

Expand Down

0 comments on commit b583718

Please sign in to comment.