Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp240432pxf; Wed, 10 Mar 2021 05:26:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVaAfb2vsX9Pxdkaz9pDYhe1Kq0SFSNamQdrJ1dvNQSlAxdDEyJpJ/hgN8CrzS4AGPALq5 X-Received: by 2002:a17:907:33c6:: with SMTP id zk6mr3553415ejb.228.1615382793144; Wed, 10 Mar 2021 05:26:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615382793; cv=none; d=google.com; s=arc-20160816; b=K+IyWCOFQjWk2sJrr/Zxo/8v2KNGHGzrFNYXPjPg+QwMKHBYm5SWk0+UZgPT4WSn7r NusDb0CcM7a6YPU+g7fhSfpIZKV4GWA7iwBwmkwheN3TmqG669Q/4C0XgjtbVtipz2Ue WAal8lRnF5Em3tJ+ZwFrsdGNoBIOab4Sy1qgRSgoi8cPvO+VH9NNcV/FCKiXeZKz+WIG fshKsx+LwlKDAhwFWczz0sg8o6fC6rinhfTe2pR2XS/RtWziq2zLSHbPUZSRpixMrEOl ZJ6d4tOg/2oz/qOKmhAoP1DXIIkqsJs6WRGOALynFcPGDKStSi+GW4VoN7sXN8qJaoYy EeMw== 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=oOfjV8X3KbrO0lNNIhB0uOL+Wz4Ac86KSNawhKyixOw=; b=RlOcdDuckSflnmLPqpa1x7CQsTFTNw1JMC6+WiVSpI8FjLxi1R1l5hvyXkooRxYjVU liEBIXkAPMDZRbxvWci6WvJgu9jSpuA3TgAQm0tpKz9ewDKpyQtQNsOcH/L2yPqQ6/4J RiRCJMaz1M6rf9KsVI+EN9gKudiX3aXYl7wbandHgxbyaoAMRqYEqP6lHaJWngp+NRSv 84zXoz1G47QcUPuWtSamvk/7QIdBRgqPm9K71aUlajchMhVXBMog1/sOOK0cyvo21VRj zgLpo3cwKsFMMH/0z/rGe9p1HcB5kdbra1KAOVXEtl4YSqoKemeKwpkXKHwhg7if9k6v nt5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hFmrvpU7; 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 ks7si11657087ejb.682.2021.03.10.05.26.09; Wed, 10 Mar 2021 05:26:33 -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=hFmrvpU7; 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 S233159AbhCJNZA (ORCPT + 99 others); Wed, 10 Mar 2021 08:25:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:45496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232787AbhCJNYR (ORCPT ); Wed, 10 Mar 2021 08:24:17 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5CB9064FF6; Wed, 10 Mar 2021 13:24:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615382657; bh=0vtkH3NkRqrCUtQBqM+61lev0wlAgAxK9Y/3NMhACQs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hFmrvpU7LoZ5CGXWziDT+S2tU3NgvMfYNAFL4Ue0iZPJFVobLBGtZbrJWq5VpXnrb 9zKW4GK1csZpO0z8ZQPaBhqPPCegB7qCdJVi3CJqgbpP9KCGTLA0TS8iij56QYCAC7 ETlw9YZ5Nr5H6x5u1PCPvZmP6KvBkqN4OeTxW1io= 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.10 06/49] btrfs: export and rename qgroup_reserve_meta Date: Wed, 10 Mar 2021 14:23:17 +0100 Message-Id: <20210310132322.156755563@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210310132321.948258062@linuxfoundation.org> References: <20210310132321.948258062@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 @@ -3875,8 +3875,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; @@ -3907,14 +3907,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 */