diff options
author | Santosh Shilimkar <santosh.shilimkar@oracle.com> | 2016-02-19 07:06:47 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-08 11:26:02 +0300 |
commit | 3311a304ec62c4bc466656638bf6ea947b4eb7ec (patch) | |
tree | c70077ac4ad5850ceb44f725aa896c064f22a4d1 /net/rds/send.c | |
parent | aa07a2ccc80d4a0fbb402e9eb2ba3912a45af807 (diff) | |
download | linux-3311a304ec62c4bc466656638bf6ea947b4eb7ec.tar.xz |
RDS: RDMA: Fix the composite message user notification
[ Upstream commit 941f8d55f6d613a460a5e080d25a38509f45eb75 ]
When application sends an RDS RDMA composite message consist of
RDMA transfer to be followed up by non RDMA payload, it expect to
be notified *only* when the full message gets delivered. RDS RDMA
notification doesn't behave this way though.
Thanks to Venkat for debug and root casuing the issue
where only first part of the message(RDMA) was
successfully delivered but remainder payload delivery failed.
In that case, application should not be notified with
a false positive of message delivery success.
Fix this case by making sure the user gets notified only after
the full message delivery.
Reviewed-by: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/rds/send.c')
-rw-r--r-- | net/rds/send.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/rds/send.c b/net/rds/send.c index 896626b9a0ef..f28651b6ae83 100644 --- a/net/rds/send.c +++ b/net/rds/send.c @@ -475,12 +475,14 @@ void rds_rdma_send_complete(struct rds_message *rm, int status) struct rm_rdma_op *ro; struct rds_notifier *notifier; unsigned long flags; + unsigned int notify = 0; spin_lock_irqsave(&rm->m_rs_lock, flags); + notify = rm->rdma.op_notify | rm->data.op_notify; ro = &rm->rdma; if (test_bit(RDS_MSG_ON_SOCK, &rm->m_flags) && - ro->op_active && ro->op_notify && ro->op_notifier) { + ro->op_active && notify && ro->op_notifier) { notifier = ro->op_notifier; rs = rm->m_rs; sock_hold(rds_rs_to_sk(rs)); |