From patchwork Wed Apr 25 10:33:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Dryomov X-Patchwork-Id: 10362239 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 68B116032C for ; Wed, 25 Apr 2018 10:33:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5729728F52 for ; Wed, 25 Apr 2018 10:33:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 490D628F5B; Wed, 25 Apr 2018 10:33:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E424228F52 for ; Wed, 25 Apr 2018 10:33:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751649AbeDYKdi (ORCPT ); Wed, 25 Apr 2018 06:33:38 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:34298 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751528AbeDYKdi (ORCPT ); Wed, 25 Apr 2018 06:33:38 -0400 Received: by mail-wr0-f194.google.com with SMTP id p18-v6so33612365wrm.1 for ; Wed, 25 Apr 2018 03:33:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=njkBnx3iKLFaUuS5XcQmHEBp6a6TLgbTU5EcrWURCQ4=; b=N5nWSQnCOEIxs42ndZl76gSoI2eNNu3qIoI0q5MytJxzM7r0joHP3yI3nK6W/fi6oD /KtN+s2d7KooOTc+EcHuFkpRTWEVdptcDUlO1Dzobvc1RDahN1t+CKfXY6KqLhG5pQWa +1luxK895JeSSUxFY7JD4O0ym8fM21N+ao0+P5mIfL5SpDj6CZQF3MYAJi9oBVwKLo2O M42S/jl7iY4jZ/sItB9kTCX2k0eCc3bdkz8ZQDCihTYYPysrLq1kXDtW0BJxa25AXeoV MXP4zJPfYiXq96Gvk+qnUvRfFEZvB4/mm+Sc7BHorhUFP1gUlAG5w1BsT66W4rtcbsEa jD4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=njkBnx3iKLFaUuS5XcQmHEBp6a6TLgbTU5EcrWURCQ4=; b=PsNQh45iBChLHa7Jbwkt7nxHWVQaIkhwwPnK3tdyIX6F6GU5dG6b6AeBByj2C/nbAe Dt25RfOJzJssLIxuYPAgxM5WtcpsjRETXSuu4VenimNzRymagxv9/xR9WlhzSv8OBS7p MiJUQq6Lo1DsqayFpw3lnz6VaABZIETw6oelNzWZTCiN9O2BjQckQDmUhmtuSlz9K0Hy /wcdUos477nptP2QaNpG8eEZtDyb4AzUqghg8TlrHTkJ9w6yiqUU8ATVadMmJri/wvgW LnnVGHNIum6qaM4Ey0ckHZqzRspH1Ws1on1czgGKgfAadFulBG+Fo0ld3bxdRsYRkn37 sdag== X-Gm-Message-State: ALQs6tAkKIOBDo8YNxbunXhP4l9b1UVoX8PAUA7isU7PDG0cDmlwKQ88 9SDkDQZ5MR29RamPEwudTIUnzITD X-Google-Smtp-Source: AIpwx49EPj8ltoRbockTZLT0uqE53PDgiqNa4eVl5/cJw1KAmSPFeQWDOyKTJx8Wy2b5A2cvV28asw== X-Received: by 2002:adf:992d:: with SMTP id x42-v6mr23672842wrb.145.1524652416615; Wed, 25 Apr 2018 03:33:36 -0700 (PDT) Received: from orange.local (ip-213-220-230-148.net.upcbroadband.cz. [213.220.230.148]) by smtp.gmail.com with ESMTPSA id q7-v6sm15462124wrf.92.2018.04.25.03.33.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Apr 2018 03:33:35 -0700 (PDT) From: Ilya Dryomov To: ceph-devel@vger.kernel.org Subject: [PATCH] libceph: get rid of more_kvec in try_write() Date: Wed, 25 Apr 2018 12:33:24 +0200 Message-Id: <1524652404-7690-1-git-send-email-idryomov@gmail.com> X-Mailer: git-send-email 2.4.3 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP All gotos to "more" are conditioned on con->state == OPEN, but the only thing "more" does is opening the socket if con->state == PREOPEN. Kill that label and rename "more_kvec" to "more". Signed-off-by: Ilya Dryomov Reviewed-by: Jason Dillaman --- net/ceph/messenger.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index a7bfc07d2876..809060786e75 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -2574,9 +2574,6 @@ static int try_write(struct ceph_connection *con) con->state != CON_STATE_OPEN) return 0; -more: - dout("try_write out_kvec_bytes %d\n", con->out_kvec_bytes); - /* open the socket first? */ if (con->state == CON_STATE_PREOPEN) { BUG_ON(con->sock); @@ -2597,7 +2594,8 @@ static int try_write(struct ceph_connection *con) } } -more_kvec: +more: + dout("try_write out_kvec_bytes %d\n", con->out_kvec_bytes); BUG_ON(!con->sock); /* kvec data queued? */ @@ -2622,7 +2620,7 @@ static int try_write(struct ceph_connection *con) ret = write_partial_message_data(con); if (ret == 1) - goto more_kvec; /* we need to send the footer, too! */ + goto more; /* we need to send the footer, too! */ if (ret == 0) goto out; if (ret < 0) { @@ -2658,8 +2656,6 @@ static int try_write(struct ceph_connection *con) return ret; } - - /* * Read what we can from the socket. */