/**
* struct kdbus_conn_reply - an entry of kdbus_conn's list of replies
* @entry: The entry of the connection's reply_list
- * @conn: The counterpart connection that is expected to answer
+ * @reply_dst: The connection the reply will be sent to (method origin)
* @queue_entry: The queue enty item that is prepared by the replying
* connection
* @deadline_ns: The deadline of the reply, in nanoseconds
*/
struct kdbus_conn_reply {
struct list_head entry;
- struct kdbus_conn *conn;
+ struct kdbus_conn *reply_dst;
struct kdbus_queue_entry *queue_entry;
u64 deadline_ns;
u64 cookie;
static void kdbus_conn_reply_free(struct kdbus_conn_reply *reply)
{
- atomic_dec(&reply->conn->reply_count);
- kdbus_conn_unref(reply->conn);
+ atomic_dec(&reply->reply_dst->reply_count);
+ kdbus_conn_unref(reply->reply_dst);
kfree(reply);
}
list_del_init(&reply->entry);
reply->waiting = false;
reply->err = err;
- wake_up_interruptible(&reply->conn->wait);
+ wake_up_interruptible(&reply->reply_dst->wait);
}
/*
* cleaned up already and the notification was sent.
*/
if (reply->deadline_ns != 0)
- kdbus_notify_reply_timeout(conn->bus, reply->conn->id,
+ kdbus_notify_reply_timeout(conn->bus,
+ reply->reply_dst->id,
reply->cookie);
list_del_init(&reply->entry);
list_for_each_entry_safe(reply, reply_tmp,
&c->reply_list, entry) {
if (reply->sync &&
- reply->conn == conn &&
+ reply->reply_dst == conn &&
reply->cookie == cookie) {
kdbus_conn_reply_sync(reply, -ECANCELED);
found = true;
mutex_lock(&conn_src->lock);
list_for_each_entry_safe(r, tmp, &conn_src->reply_list, entry) {
- if (r->conn == conn_dst &&
+ if (r->reply_dst == conn_dst &&
r->cookie == msg->cookie_reply) {
if (r->sync) {
*reply_wake = r;
goto exit_unlock;
}
- r->conn = kdbus_conn_ref(conn_src);
+ r->reply_dst = kdbus_conn_ref(conn_src);
r->cookie = msg->cookie;
if (sync) {
* by the timeout scans that might be conducted for other,
* asynchronous replies of conn_src.
*/
- r = wait_event_interruptible_timeout(reply_wait->conn->wait,
+ r = wait_event_interruptible_timeout(reply_wait->reply_dst->wait,
!reply_wait->waiting || !kdbus_conn_active(conn_src),
nsecs_to_jiffies(timeout_ns));
if (r == 0)
}
/* send a 'connection dead' notification */
- kdbus_notify_reply_dead(conn->bus, reply->conn->id,
+ kdbus_notify_reply_dead(conn->bus, reply->reply_dst->id,
reply->cookie);
list_del(&reply->entry);