From patchwork Fri Dec 14 12:34:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Foster X-Patchwork-Id: 10731083 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9B7B21751 for ; Fri, 14 Dec 2018 12:34:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B7632D1D4 for ; Fri, 14 Dec 2018 12:34:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F7C92D1CD; Fri, 14 Dec 2018 12:34:57 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 06FF92D069 for ; Fri, 14 Dec 2018 12:34:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731137AbeLNMez (ORCPT ); Fri, 14 Dec 2018 07:34:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36170 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731118AbeLNMey (ORCPT ); Fri, 14 Dec 2018 07:34:54 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9C5652F3B for ; Fri, 14 Dec 2018 12:34:54 +0000 (UTC) Received: from bfoster.bos.redhat.com (dhcp-41-2.bos.redhat.com [10.18.41.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id 55BA619C65 for ; Fri, 14 Dec 2018 12:34:54 +0000 (UTC) From: Brian Foster To: linux-xfs@vger.kernel.org Subject: [PATCH RFC 4/5] xfs: clean up variable names in xfs_alloc_ag_vextent_near() Date: Fri, 14 Dec 2018 07:34:51 -0500 Message-Id: <20181214123452.20974-5-bfoster@redhat.com> In-Reply-To: <20181214123452.20974-1-bfoster@redhat.com> References: <20181214123452.20974-1-bfoster@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 14 Dec 2018 12:34:54 +0000 (UTC) Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Brian Foster --- fs/xfs/libxfs/xfs_alloc.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c index cd35502eee2b..95ee48e3fb9d 100644 --- a/fs/xfs/libxfs/xfs_alloc.c +++ b/fs/xfs/libxfs/xfs_alloc.c @@ -1329,8 +1329,8 @@ xfs_alloc_ag_vextent_near( struct xfs_btree_cur *cnt_cur; /* cursor for count btree */ int error; /* error code */ int i; /* result code, temporary */ - xfs_agblock_t ltbno; /* start bno of left side entry */ - xfs_extlen_t ltlen; /* length of left side entry */ + xfs_agblock_t bno; /* start bno of left side entry */ + xfs_extlen_t len; /* length of left side entry */ bool busy; unsigned busy_gen; #ifdef DEBUG @@ -1354,7 +1354,7 @@ xfs_alloc_ag_vextent_near( args->agbno = args->max_agbno; restart: - ltlen = 0; + len = 0; busy = false; /* @@ -1378,11 +1378,11 @@ xfs_alloc_ag_vextent_near( if (error) goto error; if (i) { - error = xfs_alloc_get_rec(cnt_cur, <bno, <len, &i); + error = xfs_alloc_get_rec(cnt_cur, &bno, &len, &i); if (error) goto error; XFS_WANT_CORRUPTED_GOTO(args->mp, i == 1, error); - if (ltlen < args->minlen) { + if (len < args->minlen) { trace_xfs_alloc_small_notenough(args); return 0; } @@ -1393,10 +1393,10 @@ xfs_alloc_ag_vextent_near( * way. */ error = xfs_alloc_ag_vextent_small(args, cnt_cur, - <bno, <len, &i); + &bno, &len, &i); if (error) goto error; - ASSERT(i == 0 || (i && ltlen == 0)); + ASSERT(i == 0 || (i && len == 0)); xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); trace_xfs_alloc_near_noentry(args); return 0; @@ -1415,22 +1415,22 @@ xfs_alloc_ag_vextent_near( * record smaller than maxlen, go to the start of this block, * and skip all those smaller than minlen. */ - if (ltlen || args->alignment > 1) { + if (len || args->alignment > 1) { cnt_cur->bc_ptrs[0] = 1; do { - error = xfs_alloc_get_rec(cnt_cur, <bno, - <len, &i); + error = xfs_alloc_get_rec(cnt_cur, &bno, + &len, &i); if (error) goto error; XFS_WANT_CORRUPTED_GOTO(args->mp, i == 1, error); - if (ltlen >= args->minlen) + if (len >= args->minlen) break; error = xfs_btree_increment(cnt_cur, 0, &i); if (error) goto error; } while (i); - ASSERT(ltlen >= args->minlen); + ASSERT(len >= args->minlen); if (!i) goto near_bnobt; }