From patchwork Wed Feb 20 00:57:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 2165841 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 7620C3FDF1 for ; Wed, 20 Feb 2013 00:57:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759050Ab3BTA5M (ORCPT ); Tue, 19 Feb 2013 19:57:12 -0500 Received: from mail-qe0-f49.google.com ([209.85.128.49]:65340 "EHLO mail-qe0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759047Ab3BTA5M (ORCPT ); Tue, 19 Feb 2013 19:57:12 -0500 Received: by mail-qe0-f49.google.com with SMTP id 5so3399771qea.36 for ; Tue, 19 Feb 2013 16:57:11 -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=02f5Mm38nwRHSAeyHEki5z+CnpBF0x37HCadGWLwZK0=; b=NJDfuYzH86KxUGbpStW6xhRGRLuwpO8s2Us3Kyj1HlBksLS9hGkDYakpdzLQzDlHEb uTUaKpFOIB0kb6UDa4BlqUwA8gft3EbrMVd6mah+DQeEECM+Zqvw59m6TWScDEZLbgef 01RDnrDEYKgMTL0Bz3jUKWMsinanprKGnL0Khd2Bw4DLuagFUVHdtBUir38LM0F3J+5y GJ5nCCJbNTtd5pUop9KKPFy4iGufoNVHtUF2K8GQ3t5zHBHlsTtz0kmFBpKb9iz/Vfly e/mJihSB1jvt/grRrwhvXpmfJynuAQJLiIHPwn4pAmKztYkeG9HsqV3NKg1Bt9aqFm2w Hrfw== X-Received: by 10.49.104.108 with SMTP id gd12mr8502018qeb.37.1361321831630; Tue, 19 Feb 2013 16:57:11 -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 g6sm2289399qav.6.2013.02.19.16.57.10 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Feb 2013 16:57:10 -0800 (PST) Message-ID: <51241F65.7060109@inktank.com> Date: Tue, 19 Feb 2013 18:57:09 -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 Subject: [PATCH 5/5] libceph: indent properly References: <51241E15.80903@inktank.com> In-Reply-To: <51241E15.80903@inktank.com> X-Gm-Message-State: ALoCoQl9QX/wCTTHHUfZGq9bo7ebWMuYwz7trMw6yoI/Gw3JH4T00ywGHMMuH+IyL1l1CitQYTWI 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 --- 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 609f2eb..8f1272d 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -2341,50 +2341,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("con_work %p SOCK_CLOSED\n", con); - break; - } - if (con_backoff(con)) { - dout("con_work %p BACKOFF\n", con); - break; - } - if (con->state == CON_STATE_STANDBY) { - dout("con_work %p STANDBY\n", con); - break; - } - if (con->state == CON_STATE_CLOSED) { - dout("con_work %p CLOSED\n", con); - BUG_ON(con->sock); - break; - } - if (con->state == CON_STATE_PREOPEN) { - dout("con_work %p OPENING\n", con); - BUG_ON(con->sock); - } + if ((fault = con_sock_closed(con))) { + dout("con_work %p SOCK_CLOSED\n", con); + break; + } + if (con_backoff(con)) { + dout("con_work %p BACKOFF\n", con); + break; + } + if (con->state == CON_STATE_STANDBY) { + dout("con_work %p STANDBY\n", con); + break; + } + if (con->state == CON_STATE_CLOSED) { + dout("con_work %p CLOSED\n", con); + BUG_ON(con->sock); + break; + } + if (con->state == CON_STATE_PREOPEN) { + dout("con_work %p OPENING\n", 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);