RDS: Clear up some confusing code in send_remove_from_sock
authorAndy Grover <andy.grover@oracle.com>
Tue, 12 Jan 2010 22:19:32 +0000 (14:19 -0800)
committerAndy Grover <andy.grover@oracle.com>
Thu, 9 Sep 2010 01:11:40 +0000 (18:11 -0700)
The previous code was correct, but made the assumption that
if r_notifier was non-NULL then either r_recverr or r_notify
was true. Valid, but fragile. Changed to explicitly check
r_recverr (shows up in greps for recverr now, too.)

Signed-off-by: Andy Grover <andy.grover@oracle.com>
net/rds/send.c

index 72dbe7f..b751a8e 100644 (file)
@@ -551,7 +551,7 @@ void rds_send_remove_from_sock(struct list_head *messages, int status)
                        rds_send_sndbuf_remove(rs, rm);
 
                        if (ro->r_active && ro->r_notifier &&
-                           (status || ro->r_notify)) {
+                           (ro->r_notify || (ro->r_recverr && status))) {
                                notifier = ro->r_notifier;
                                list_add_tail(&notifier->n_list,
                                                &rs->rs_notify_queue);