Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5a79475 authored by Jan Beulich's avatar Jan Beulich Committed by David Vrabel
Browse files

xenbus: simplify xenbus_dev_request_and_reply()



No need to retain a local copy of the full request message, only the
type is really needed.

Signed-off-by: default avatarJan Beulich <jbeulich@suse.com>
Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
parent 7469be95
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -232,10 +232,10 @@ static void transaction_resume(void)
void *xenbus_dev_request_and_reply(struct xsd_sockmsg *msg)
{
	void *ret;
	struct xsd_sockmsg req_msg = *msg;
	enum xsd_sockmsg_type type = msg->type;
	int err;

	if (req_msg.type == XS_TRANSACTION_START)
	if (type == XS_TRANSACTION_START)
		transaction_start();

	mutex_lock(&xs_state.request_mutex);
@@ -250,8 +250,7 @@ void *xenbus_dev_request_and_reply(struct xsd_sockmsg *msg)
	mutex_unlock(&xs_state.request_mutex);

	if ((msg->type == XS_TRANSACTION_END) ||
	    ((req_msg.type == XS_TRANSACTION_START) &&
	     (msg->type == XS_ERROR)))
	    ((type == XS_TRANSACTION_START) && (msg->type == XS_ERROR)))
		transaction_end();

	return ret;