From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ECFDDC3A5A3 for ; Tue, 27 Aug 2019 11:46:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C8B1D2173E for ; Tue, 27 Aug 2019 11:46:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728222AbfH0Lqe (ORCPT ); Tue, 27 Aug 2019 07:46:34 -0400 Received: from mx2.suse.de ([195.135.220.15]:42054 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726140AbfH0Lqd (ORCPT ); Tue, 27 Aug 2019 07:46:33 -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 D7ED7AF19 for ; Tue, 27 Aug 2019 11:46:32 +0000 (UTC) From: Nikolay Borisov To: linux-btrfs@vger.kernel.org Cc: Nikolay Borisov Subject: [PATCH 0/3] Cleanup btrfs_find_name_in* functions Date: Tue, 27 Aug 2019 14:46:27 +0300 Message-Id: <20190827114630.2425-1-nborisov@suse.com> X-Mailer: git-send-email 2.17.1 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org This series cleans up the calling convention of the 2 function used to search the INODE_REF items for the presence of particular name. Namely, I switch the 2 functions to directly return a struct btrfs_inode_(ext)?ref. This reduces the number of parameters when calling the functions. While doing the aforementioned cleanup I stumbled upon backref_in_log which was opencoding btrfs_find_name_in_backref hence I just refactored the function. This series survived xfstest. Nikolay Borisov (3): btrfs: Make btrfs_find_name_in_backref return btrfs_inode_ref struct btrfs: Make btrfs_find_name_in_ext_backref return struct btrfs_inode_extref btrfs: Use btrfs_find_name_in_backref in backref_in_log fs/btrfs/ctree.h | 15 +++++----- fs/btrfs/inode-item.c | 62 ++++++++++++++++++----------------------- fs/btrfs/tree-log.c | 65 +++++++++++++------------------------------ 3 files changed, 54 insertions(+), 88 deletions(-) -- 2.17.1