Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp240555pxf; Wed, 10 Mar 2021 05:26:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJzp47clTIf1YPG2bHydpFzcaSlphsc3p7WBtBpTQ2sFClv3XC7vbxYTDIYSLIwbTeZChI9j X-Received: by 2002:aa7:c353:: with SMTP id j19mr3210901edr.263.1615382804249; Wed, 10 Mar 2021 05:26:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615382804; cv=none; d=google.com; s=arc-20160816; b=M+gKwRuAfVtwHQm/shOv8zjKNQfJglSvyIPllBUUUFSGJHlMnWpQB8alYQTz/bx4Gd WmWVIqHoaiS5geZABfUQLVqBjWFvrX4zrhxaEUxa8uLFSqdRrWgloDgR4vJrsQSfBzz0 yqzMPNPQ9QIod0R78SXD0RAbjGnjYPD0ZwgWGVPOYe9BL3fRohJ4Dn+cF+eEZmxaYLsf 9qI4mkzIFh42FpBeeMkSIVUE+Uo26z4IznvsxLP1AlIprqbfxDNojR+PpjuSK/5TKCVx Y8TKUYjF5XiP6h/LZSmC/Y9VJPRTDH/HgGb0LK5ou3OAzGIj5I4swnphzHPAN3mfnCwJ U3uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=v1hXajHJ7wyWdxwF2vYNej7JmIRT/sYtYWQe4twmj78=; b=OZV1si4KWg7SfXj19mR5P4wX2YWD/eW+BoCkHreppZbqyHIBPKzALkf+kw0dfc0ksV X77AtIt0UuOjEhwe01HeBQanpUG4hOvoRRouSymvPZh/fWj3xPHKUaXxPLfSHHyeiJZo TkNa91A81yY3iEJPnes2aEcwFQB01ZCsCmwrPexiYtOzLyeYQufFlkAgg+aonbCGyc0p yzmM4gFl1nIXdgRHnNId9kgvP+RF2UudNx5r+J+ntxcFoCXRE+6aSKO2ix9DvL54gHP/ FX7LbuDIZ82ipWrCEh9OL9U+fkhA8LMvNbzHSgKzfCPiWC4R7aD4j/s/K5z9HkEIRvCg BFpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VmnhcCkd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t8si12499462edd.473.2021.03.10.05.26.20; Wed, 10 Mar 2021 05:26:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VmnhcCkd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233202AbhCJNZF (ORCPT + 99 others); Wed, 10 Mar 2021 08:25:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:45548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232808AbhCJNYW (ORCPT ); Wed, 10 Mar 2021 08:24:22 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4EFC364FF3; Wed, 10 Mar 2021 13:24:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615382661; bh=Mv7fJKNjfiRutYFVYnTT1lTLGnJfdjtqJHtP1adkQjw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VmnhcCkdUyW4HWJta4SZdbiCcxWmUIZZaa7wTIT28cphgcyQ/HL1/037qoGhUVO0N auOCLhg5iAtEcHcgJlJhqwXEnh+y6ddjeCKXYQ5VC7PasD1JqViNhnf2qUgalZWkwq EWS959bOsCO9oRkW2BP8ZbtTBhcHhDxLKmdMmL/E= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nikolay Borisov , David Sterba , Sudip Mukherjee Subject: [PATCH 5.11 15/36] btrfs: export and rename qgroup_reserve_meta Date: Wed, 10 Mar 2021 14:23:28 +0100 Message-Id: <20210310132320.997397561@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210310132320.510840709@linuxfoundation.org> References: <20210310132320.510840709@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Nikolay Borisov commit 80e9baed722c853056e0c5374f51524593cb1031 upstream Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman --- fs/btrfs/qgroup.c | 8 ++++---- fs/btrfs/qgroup.h | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -3841,8 +3841,8 @@ static int sub_root_meta_rsv(struct btrf return num_bytes; } -static int qgroup_reserve_meta(struct btrfs_root *root, int num_bytes, - enum btrfs_qgroup_rsv_type type, bool enforce) +int btrfs_qgroup_reserve_meta(struct btrfs_root *root, int num_bytes, + enum btrfs_qgroup_rsv_type type, bool enforce) { struct btrfs_fs_info *fs_info = root->fs_info; int ret; @@ -3873,14 +3873,14 @@ int __btrfs_qgroup_reserve_meta(struct b { int ret; - ret = qgroup_reserve_meta(root, num_bytes, type, enforce); + ret = btrfs_qgroup_reserve_meta(root, num_bytes, type, enforce); if (ret <= 0 && ret != -EDQUOT) return ret; ret = try_flush_qgroup(root); if (ret < 0) return ret; - return qgroup_reserve_meta(root, num_bytes, type, enforce); + return btrfs_qgroup_reserve_meta(root, num_bytes, type, enforce); } void btrfs_qgroup_free_meta_all_pertrans(struct btrfs_root *root) --- a/fs/btrfs/qgroup.h +++ b/fs/btrfs/qgroup.h @@ -361,6 +361,8 @@ int btrfs_qgroup_release_data(struct btr int btrfs_qgroup_free_data(struct btrfs_inode *inode, struct extent_changeset *reserved, u64 start, u64 len); +int btrfs_qgroup_reserve_meta(struct btrfs_root *root, int num_bytes, + enum btrfs_qgroup_rsv_type type, bool enforce); int __btrfs_qgroup_reserve_meta(struct btrfs_root *root, int num_bytes, enum btrfs_qgroup_rsv_type type, bool enforce); /* Reserve metadata space for pertrans and prealloc type */