Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755110AbbBBC42 (ORCPT ); Sun, 1 Feb 2015 21:56:28 -0500 Received: from linuxhacker.ru ([217.76.32.60]:59830 "EHLO fiona.linuxhacker.ru" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S932126AbbBBCxS (ORCPT ); Sun, 1 Feb 2015 21:53:18 -0500 From: green@linuxhacker.ru To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger Cc: Linux Kernel Mailing List , Niu Yawei , Oleg Drokin Subject: [PATCH 13/20] staging/lustre/ptlrpc: hold rq_lock when modify rq_flags Date: Sun, 1 Feb 2015 21:52:12 -0500 Message-Id: <1422845539-26742-14-git-send-email-green@linuxhacker.ru> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1422845539-26742-1-git-send-email-green@linuxhacker.ru> References: <1422845539-26742-1-git-send-email-green@linuxhacker.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1332 Lines: 36 From: Niu Yawei In after_reply(), take the rq_lock for changing the rq_resend. Signed-off-by: Niu Yawei Reviewed-on: http://review.whamcloud.com/11957 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5633 Reviewed-by: Fan Yong Reviewed-by: Johann Lombardi Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/ptlrpc/client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c index 8c1ec83..4882dd0 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/client.c +++ b/drivers/staging/lustre/lustre/ptlrpc/client.c @@ -1247,7 +1247,9 @@ static int after_reply(struct ptlrpc_request *req) time_t now = get_seconds(); DEBUG_REQ(D_RPCTRACE, req, "Resending request on EINPROGRESS"); + spin_lock(&req->rq_lock); req->rq_resend = 1; + spin_unlock(&req->rq_lock); req->rq_nr_resend++; /* allocate new xid to avoid reply reconstruction */ -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/