From owner-svn-src-all@FreeBSD.ORG Thu Oct 27 20:13:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F028106564A; Thu, 27 Oct 2011 20:13:39 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F48B8FC0A; Thu, 27 Oct 2011 20:13:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9RKDdkA023248; Thu, 27 Oct 2011 20:13:39 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RKDdP3023246; Thu, 27 Oct 2011 20:13:39 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110272013.p9RKDdP3023246@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 27 Oct 2011 20:13:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226856 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2011 20:13:39 -0000 Author: pjd Date: Thu Oct 27 20:13:39 2011 New Revision: 226856 URL: http://svn.freebsd.org/changeset/base/226856 Log: Reduce indentation. MFC after: 3 days Modified: head/sbin/hastd/primary.c Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Thu Oct 27 20:10:21 2011 (r226855) +++ head/sbin/hastd/primary.c Thu Oct 27 20:13:39 2011 (r226856) @@ -1319,18 +1319,18 @@ local_send_thread(void *arg) } break; } - if (refcount_release(&hio->hio_countdown)) { - if (ISSYNCREQ(hio)) { - mtx_lock(&sync_lock); - SYNCREQDONE(hio); - mtx_unlock(&sync_lock); - cv_signal(&sync_cond); - } else { - pjdlog_debug(2, - "local_send: (%p) Moving request to the done queue.", - hio); - QUEUE_INSERT2(hio, done); - } + if (!refcount_release(&hio->hio_countdown)) + continue; + if (ISSYNCREQ(hio)) { + mtx_lock(&sync_lock); + SYNCREQDONE(hio); + mtx_unlock(&sync_lock); + cv_signal(&sync_cond); + } else { + pjdlog_debug(2, + "local_send: (%p) Moving request to the done queue.", + hio); + QUEUE_INSERT2(hio, done); } } /* NOTREACHED */ @@ -1640,18 +1640,18 @@ remote_recv_thread(void *arg) hio->hio_errors[ncomp] = 0; nv_free(nv); done_queue: - if (refcount_release(&hio->hio_countdown)) { - if (ISSYNCREQ(hio)) { - mtx_lock(&sync_lock); - SYNCREQDONE(hio); - mtx_unlock(&sync_lock); - cv_signal(&sync_cond); - } else { - pjdlog_debug(2, - "remote_recv: (%p) Moving request to the done queue.", - hio); - QUEUE_INSERT2(hio, done); - } + if (!refcount_release(&hio->hio_countdown)) + continue; + if (ISSYNCREQ(hio)) { + mtx_lock(&sync_lock); + SYNCREQDONE(hio); + mtx_unlock(&sync_lock); + cv_signal(&sync_cond); + } else { + pjdlog_debug(2, + "remote_recv: (%p) Moving request to the done queue.", + hio); + QUEUE_INSERT2(hio, done); } } /* NOTREACHED */