From patchwork Fri Feb 22 17:30:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 2176741 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 35C48DFABD for ; Fri, 22 Feb 2013 17:30:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758164Ab3BVRay (ORCPT ); Fri, 22 Feb 2013 12:30:54 -0500 Received: from mail-ia0-f182.google.com ([209.85.210.182]:35277 "EHLO mail-ia0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757714Ab3BVRax (ORCPT ); Fri, 22 Feb 2013 12:30:53 -0500 Received: by mail-ia0-f182.google.com with SMTP id k38so750456iah.27 for ; Fri, 22 Feb 2013 09:30:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=xB0jGylpZ9HvD5ynqvgdf0g4BNJhA3RzJ1/tYrSG38g=; b=HpfdqcZejd7PfTmPgEtA5W+sg5vepa1dzqZq6oT0ZNCh/ulLUPpwCcdOT6OkcUhf6s /vrAJiMURKim3+BatF4vjONKQLxkve0qlRPLlTuYudtV0LXIOMG6MaF17MB0bbEJxKiR 8gXelTizQbyRtQNpxTTXFtITAJ7QBMGX05UEAnwonMim8RAvKmlSvVYFhFloJCBAQtUA bALw6kwxCYK3Cg1Nz+r9JxDwz68N4d5B61axKCerg0wESbg7kpv/pVIStzxn+N6VChH1 aBO/I/jZjL6WVifgNdvEkI6N6PHUbqxKC68FQEymz4sMjIR5F5X3SfD7zB8v9IbIXfQ5 /mvQ== X-Received: by 10.50.88.226 with SMTP id bj2mr1216294igb.105.1361554252984; Fri, 22 Feb 2013 09:30:52 -0800 (PST) Received: from [172.22.22.4] (c-71-195-31-37.hsd1.mn.comcast.net. [71.195.31.37]) by mx.google.com with ESMTPS id gy3sm2071815igc.10.2013.02.22.09.30.51 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 22 Feb 2013 09:30:52 -0800 (PST) Message-ID: <5127AB4A.9080908@inktank.com> Date: Fri, 22 Feb 2013 11:30:50 -0600 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: "ceph-devel@vger.kernel.org >> ceph-devel" Subject: [PATCH 5/5, v2] libceph: indent properly References: <5127A85D.1070000@inktank.com> <5127A935.8020605@inktank.com> In-Reply-To: <5127A935.8020605@inktank.com> X-Gm-Message-State: ALoCoQnCPuzBT9NyaCE5FPXeyObyIV5NF+lZzjhAr7XBu87+SQQ8nB/CX3JxFCkCZURpej9aF7Jw Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org This is just the second part of a two-part patch. It simply indents a block of code. This patch is going to be merged into its predecessor following review. Signed-off-by: Alex Elder --- v2: rebased net/ceph/messenger.c | 80 +++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 223406f..2c0669f 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -2390,50 +2390,50 @@ static void con_work(struct work_struct *work) bool fault; mutex_lock(&con->mutex); -while (true) { - int ret; + while (true) { + int ret; - if ((fault = con_sock_closed(con))) { - dout("%s: con %p SOCK_CLOSED\n", __func__, con); - break; - } - if (con_backoff(con)) { - dout("%s: con %p BACKOFF\n", __func__, con); - break; - } - if (con->state == CON_STATE_STANDBY) { - dout("%s: con %p STANDBY\n", __func__, con); - break; - } - if (con->state == CON_STATE_CLOSED) { - dout("%s: con %p CLOSED\n", __func__, con); - BUG_ON(con->sock); - break; - } - if (con->state == CON_STATE_PREOPEN) { - dout("%s: con %p PREOPEN\n", __func__, con); - BUG_ON(con->sock); - } + if ((fault = con_sock_closed(con))) { + dout("%s: con %p SOCK_CLOSED\n", __func__, con); + break; + } + if (con_backoff(con)) { + dout("%s: con %p BACKOFF\n", __func__, con); + break; + } + if (con->state == CON_STATE_STANDBY) { + dout("%s: con %p STANDBY\n", __func__, con); + break; + } + if (con->state == CON_STATE_CLOSED) { + dout("%s: con %p CLOSED\n", __func__, con); + BUG_ON(con->sock); + break; + } + if (con->state == CON_STATE_PREOPEN) { + dout("%s: con %p PREOPEN\n", __func__, con); + BUG_ON(con->sock); + } - ret = try_read(con); - if (ret < 0) { - if (ret == -EAGAIN) - continue; - con->error_msg = "socket error on read"; - fault = true; - break; - } + ret = try_read(con); + if (ret < 0) { + if (ret == -EAGAIN) + continue; + con->error_msg = "socket error on read"; + fault = true; + break; + } - ret = try_write(con); - if (ret < 0) { - if (ret == -EAGAIN) - continue; - con->error_msg = "socket error on write"; - fault = true; - } + ret = try_write(con); + if (ret < 0) { + if (ret == -EAGAIN) + continue; + con->error_msg = "socket error on write"; + fault = true; + } - break; /* If we make it to here, we're done */ -} + break; /* If we make it to here, we're done */ + } if (fault) con_fault(con); mutex_unlock(&con->mutex);