[lustre-devel] [PATCH 03/28] lustre: ptlrpc: missing barrier before wake_up
James Simmons
jsimmons at infradead.org
Sun Oct 14 11:57:53 PDT 2018
From: Lai Siyao <lai.siyao at whamcloud.com>
ptlrpc_client_wake_req() misses a memory barrier, which may cause
strange errors.
Signed-off-by: Lai Siyao <lai.siyao at whamcloud.com>
WC-bug-id: https://jira.whamcloud.com/browse/LU-8935
Reviewed-on: https://review.whamcloud.com/26583
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: Wang Shilong <wshilong at ddn.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
drivers/staging/lustre/lustre/include/lustre_net.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h
index ce7e98c..468a03e 100644
--- a/drivers/staging/lustre/lustre/include/lustre_net.h
+++ b/drivers/staging/lustre/lustre/include/lustre_net.h
@@ -2211,6 +2211,8 @@ static inline int ptlrpc_status_ntoh(int n)
static inline void
ptlrpc_client_wake_req(struct ptlrpc_request *req)
{
+ /* ensure ptlrpc_register_bulk see rq_resend as set. */
+ smp_mb();
if (!req->rq_set)
wake_up(&req->rq_reply_waitq);
else
--
1.8.3.1
More information about the lustre-devel
mailing list