From patchwork Mon Oct 19 02:49:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shraddha Barke X-Patchwork-Id: 7432781 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 21DECBEEA4 for ; Mon, 19 Oct 2015 02:49:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 55B062063C for ; Mon, 19 Oct 2015 02:49:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7A6372063B for ; Mon, 19 Oct 2015 02:49:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753133AbbJSCto (ORCPT ); Sun, 18 Oct 2015 22:49:44 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:36306 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752709AbbJSCtn (ORCPT ); Sun, 18 Oct 2015 22:49:43 -0400 Received: by pacfv9 with SMTP id fv9so79502035pac.3 for ; Sun, 18 Oct 2015 19:49:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=tOtYslKhnr4f+28pE7MtClgPadDMQNDpIMWTyYd9gv4=; b=JEVOEg3ChSTTRXj8ZGEUlp8XPxbmRUR40uJNI1r+DRwhrWh5I4UFJX6KlpFMdKbEf0 8ywYsAOpQZEr1xEhaJIFcsXPrryOZjrMa4bfSOo9UfoKxB05HwvawCk2WMJxd0Yu2Mh7 XSW8TRL8WB4Z0w9NhQ518q5HvsRU+f2sEtabdZJtdsRZM7jicIBfumaTmJ/suQeFoktA yqrCPz1qg0rvhwkqB81jjWeuH37cZlALY6GdZgvthMfBmgqPRBXEd04CyplskRIyufJ7 GvnhBJLrlzWDHATJaZDdI7XMpd+IEGxDjr9ZOP5pcskIxFOdZ/zanl7o04UGt/q5aqg7 WTFg== X-Received: by 10.66.157.3 with SMTP id wi3mr31667888pab.17.1445222983430; Sun, 18 Oct 2015 19:49:43 -0700 (PDT) Received: from shraddha-370R4E-370R4V-370R5E-3570RE-370R5V.bits-goa.ac.in ([103.225.100.51]) by smtp.gmail.com with ESMTPSA id ce3sm33128926pbb.35.2015.10.18.19.49.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 18 Oct 2015 19:49:42 -0700 (PDT) From: Shraddha Barke To: ceph-devel@vger.kernel.org, Alex Elder Subject: [PATCH v2] Net: ceph: messenger: Use local variable cursor in read_partial_msg_data() Date: Mon, 19 Oct 2015 08:19:35 +0530 Message-Id: <1445222975-16086-1-git-send-email-shraddha.6596@gmail.com> X-Mailer: git-send-email 2.1.4 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use local variable cursor in place of &msg->cursor in read_partial_msg_data() Signed-off-by: Shraddha Barke --- Changes in v2- Drop incorrect use of cursor net/ceph/messenger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index b9b0e3b..b087edd 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -2246,7 +2246,7 @@ static int read_partial_msg_data(struct ceph_connection *con) if (do_datacrc) crc = con->in_data_crc; while (cursor->resid) { - page = ceph_msg_data_next(&msg->cursor, &page_offset, &length, + page = ceph_msg_data_next(cursor, &page_offset, &length, NULL); ret = ceph_tcp_recvpage(con->sock, page, page_offset, length); if (ret <= 0) { @@ -2258,7 +2258,7 @@ static int read_partial_msg_data(struct ceph_connection *con) if (do_datacrc) crc = ceph_crc32c_page(crc, page, page_offset, ret); - (void) ceph_msg_data_advance(&msg->cursor, (size_t)ret); + (void) ceph_msg_data_advance(cursor, (size_t)ret); } if (do_datacrc) con->in_data_crc = crc;