Revert "net:rds: Fix possible deadlock in rds_message_put"
This reverts commit 5c07cf9908
.
This commit is contained in:
parent
cdca95f775
commit
6ab3af7f42
1 changed files with 2 additions and 11 deletions
|
@ -424,7 +424,6 @@ static int rds_still_queued(struct rds_sock *rs, struct rds_incoming *inc,
|
||||||
struct sock *sk = rds_rs_to_sk(rs);
|
struct sock *sk = rds_rs_to_sk(rs);
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct rds_incoming *to_drop = NULL;
|
|
||||||
|
|
||||||
write_lock_irqsave(&rs->rs_recv_lock, flags);
|
write_lock_irqsave(&rs->rs_recv_lock, flags);
|
||||||
if (!list_empty(&inc->i_item)) {
|
if (!list_empty(&inc->i_item)) {
|
||||||
|
@ -435,14 +434,11 @@ static int rds_still_queued(struct rds_sock *rs, struct rds_incoming *inc,
|
||||||
-be32_to_cpu(inc->i_hdr.h_len),
|
-be32_to_cpu(inc->i_hdr.h_len),
|
||||||
inc->i_hdr.h_dport);
|
inc->i_hdr.h_dport);
|
||||||
list_del_init(&inc->i_item);
|
list_del_init(&inc->i_item);
|
||||||
to_drop = inc;
|
rds_inc_put(inc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
write_unlock_irqrestore(&rs->rs_recv_lock, flags);
|
write_unlock_irqrestore(&rs->rs_recv_lock, flags);
|
||||||
|
|
||||||
if (to_drop)
|
|
||||||
rds_inc_put(to_drop);
|
|
||||||
|
|
||||||
rdsdebug("inc %p rs %p still %d dropped %d\n", inc, rs, ret, drop);
|
rdsdebug("inc %p rs %p still %d dropped %d\n", inc, rs, ret, drop);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -765,21 +761,16 @@ void rds_clear_recv_queue(struct rds_sock *rs)
|
||||||
struct sock *sk = rds_rs_to_sk(rs);
|
struct sock *sk = rds_rs_to_sk(rs);
|
||||||
struct rds_incoming *inc, *tmp;
|
struct rds_incoming *inc, *tmp;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
LIST_HEAD(to_drop);
|
|
||||||
|
|
||||||
write_lock_irqsave(&rs->rs_recv_lock, flags);
|
write_lock_irqsave(&rs->rs_recv_lock, flags);
|
||||||
list_for_each_entry_safe(inc, tmp, &rs->rs_recv_queue, i_item) {
|
list_for_each_entry_safe(inc, tmp, &rs->rs_recv_queue, i_item) {
|
||||||
rds_recv_rcvbuf_delta(rs, sk, inc->i_conn->c_lcong,
|
rds_recv_rcvbuf_delta(rs, sk, inc->i_conn->c_lcong,
|
||||||
-be32_to_cpu(inc->i_hdr.h_len),
|
-be32_to_cpu(inc->i_hdr.h_len),
|
||||||
inc->i_hdr.h_dport);
|
inc->i_hdr.h_dport);
|
||||||
list_move(&inc->i_item, &to_drop);
|
|
||||||
}
|
|
||||||
write_unlock_irqrestore(&rs->rs_recv_lock, flags);
|
|
||||||
|
|
||||||
list_for_each_entry_safe(inc, tmp, &to_drop, i_item) {
|
|
||||||
list_del_init(&inc->i_item);
|
list_del_init(&inc->i_item);
|
||||||
rds_inc_put(inc);
|
rds_inc_put(inc);
|
||||||
}
|
}
|
||||||
|
write_unlock_irqrestore(&rs->rs_recv_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue