Whamcloud - gitweb
LU-8935 ptlrpc: missing barrier before wake_up 83/26583/4
authorLai Siyao <lai.siyao@intel.com>
Wed, 12 Apr 2017 21:56:50 +0000 (05:56 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 29 Jul 2017 00:02:26 +0000 (00:02 +0000)
ptlrpc_client_wake_req() misses a memory barrier, which may cause
strange errors.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: Ic8e9cbaf8c07f503798b95c608477508204d9614
Reviewed-on: https://review.whamcloud.com/26583
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre_net.h

index 6c9f530..f705ceb 100644 (file)
@@ -2517,6 +2517,7 @@ ptlrpc_client_recv_or_unlink(struct ptlrpc_request *req)
 static inline void
 ptlrpc_client_wake_req(struct ptlrpc_request *req)
 {
 static inline void
 ptlrpc_client_wake_req(struct ptlrpc_request *req)
 {
+       smp_mb();
        if (req->rq_set == NULL)
                wake_up(&req->rq_reply_waitq);
        else
        if (req->rq_set == NULL)
                wake_up(&req->rq_reply_waitq);
        else