From patchwork Mon May 29 15:17:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Filipe Manana X-Patchwork-Id: 13258714 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CC28C7EE2E for ; Mon, 29 May 2023 15:18:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229781AbjE2PRl (ORCPT ); Mon, 29 May 2023 11:17:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229773AbjE2PR1 (ORCPT ); Mon, 29 May 2023 11:17:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A106EC9 for ; Mon, 29 May 2023 08:17:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3F0AD615DD for ; Mon, 29 May 2023 15:17:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D36FC433EF for ; Mon, 29 May 2023 15:17:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685373445; bh=oXiums+JHu6NBp8CHzKQMSZOcn1ycbQ4h46zJ0jPjGA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YWPPgWua9lT9rWwJAN5PV3E9Ddq2Eh1zyQeXPNpwMs91azzzIP9Gecbq/wxPUDVpD +Dq5BTLf1xpvcEaAbfOzO4rtjaS9T8grTPmAe2RGS8ikdIJAsQlAGeS3wIm7RFRejZ NbqrWgTaBgS+HHwd4HxYjlRlLCga0vkpPHsn5OZyYJmLatwR27oQTn+t89tt3EMN3m 79yl3XfJWV6p/Xpk1rfCwzavkecQLcLYvzXIVo5cQYYMr120JygW7Mbzg1HyhLGFd6 dzcNiFMgOLBaKHOhQ0Svxs12eTBwRH6id/+bbCCrRPEtAr7CanjH/3ZMBT+/8aTRdo AIW0ts9Njs+5A== From: fdmanana@kernel.org To: linux-btrfs@vger.kernel.org Subject: [PATCH 11/11] btrfs: make btrfs_destroy_delayed_refs() return void Date: Mon, 29 May 2023 16:17:07 +0100 Message-Id: <8f1298da5496557ca89592916cd4a445b6048b8f.1685363099.git.fdmanana@suse.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org From: Filipe Manana btrfs_destroy_delayed_refs() always returns 0 and its single caller does not even check its return value, so make it return void. Signed-off-by: Filipe Manana --- fs/btrfs/disk-io.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index fb7ec47f21f1..02e9004f79dc 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -4809,13 +4809,12 @@ static void btrfs_destroy_all_ordered_extents(struct btrfs_fs_info *fs_info) btrfs_wait_ordered_roots(fs_info, U64_MAX, 0, (u64)-1); } -static int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans, - struct btrfs_fs_info *fs_info) +static void btrfs_destroy_delayed_refs(struct btrfs_transaction *trans, + struct btrfs_fs_info *fs_info) { struct rb_node *node; struct btrfs_delayed_ref_root *delayed_refs; struct btrfs_delayed_ref_node *ref; - int ret = 0; delayed_refs = &trans->delayed_refs; @@ -4823,7 +4822,7 @@ static int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans, if (atomic_read(&delayed_refs->num_entries) == 0) { spin_unlock(&delayed_refs->lock); btrfs_debug(fs_info, "delayed_refs has NO entry"); - return ret; + return; } while ((node = rb_first_cached(&delayed_refs->href_root)) != NULL) { @@ -4884,8 +4883,6 @@ static int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans, btrfs_qgroup_destroy_extent_records(trans); spin_unlock(&delayed_refs->lock); - - return ret; } static void btrfs_destroy_delalloc_inodes(struct btrfs_root *root)