From patchwork Thu Oct 11 15:03:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 10636817 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 4C01216B1 for ; Thu, 11 Oct 2018 15:04:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CF872B927 for ; Thu, 11 Oct 2018 15:04:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 319EA2B934; Thu, 11 Oct 2018 15:04:12 +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 509D52B927 for ; Thu, 11 Oct 2018 15:04:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728110AbeJKWbm (ORCPT ); Thu, 11 Oct 2018 18:31:42 -0400 Received: from mx2.suse.de ([195.135.220.15]:50024 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727370AbeJKWbl (ORCPT ); Thu, 11 Oct 2018 18:31:41 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 351DDB030 for ; Thu, 11 Oct 2018 15:04:07 +0000 (UTC) From: Nikolay Borisov To: linux-btrfs@vger.kernel.org Cc: Nikolay Borisov Subject: [PATCH 1/8] btrfstune: Remove fs_info arg from change_device_uuid Date: Thu, 11 Oct 2018 18:03:57 +0300 Message-Id: <1539270244-27076-2-git-send-email-nborisov@suse.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539270244-27076-1-git-send-email-nborisov@suse.com> References: <1539270244-27076-1-git-send-email-nborisov@suse.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This function already takes an extent buffer that contains a reference to the fs_info. Use that and reduce argument count. No functional changes. Signed-off-by: Nikolay Borisov --- btrfstune.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/btrfstune.c b/btrfstune.c index 889b931c55d8..723317a00f3a 100644 --- a/btrfstune.c +++ b/btrfstune.c @@ -179,10 +179,10 @@ static int change_extents_uuid(struct btrfs_fs_info *fs_info) return ret; } -static int change_device_uuid(struct btrfs_fs_info *fs_info, struct extent_buffer *eb, - int slot) +static int change_device_uuid(struct extent_buffer *eb, int slot) { struct btrfs_dev_item *di; + struct btrfs_fs_info *fs_info = eb->fs_info; int ret = 0; di = btrfs_item_ptr(eb, slot, struct btrfs_dev_item); @@ -217,7 +217,7 @@ static int change_devices_uuid(struct btrfs_fs_info *fs_info) if (key.type != BTRFS_DEV_ITEM_KEY || key.objectid != BTRFS_DEV_ITEMS_OBJECTID) goto next; - ret = change_device_uuid(fs_info, path.nodes[0], path.slots[0]); + ret = change_device_uuid(path.nodes[0], path.slots[0]); if (ret < 0) goto out; next: