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=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 A95D0C10F14 for ; Thu, 3 Oct 2019 17:27:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7DC2320830 for ; Thu, 3 Oct 2019 17:27:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570123678; bh=yMx/H7OD2uW4oLP8Y6+fIh/TB4XMrwAZ/YucbCxVYcE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=WA7TPOd3zdSefDZbJZYMbtByd2334eWJsoduVjRcAChZWRJw9qWXkPwdbhS8S92zx QaON4YjK0OezlM8GP3nDG9B6nZJ4nvdIlzrsCZF9UxbIA+OvRWnntrgGFKAZFBv0bo U/UB3j3bboeuYOYMCv4CZqZ2KESGbAKCs6DY+qeQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729087AbfJCQOV (ORCPT ); Thu, 3 Oct 2019 12:14:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:37524 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388564AbfJCQOS (ORCPT ); Thu, 3 Oct 2019 12:14:18 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 250212054F; Thu, 3 Oct 2019 16:14:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570119257; bh=yMx/H7OD2uW4oLP8Y6+fIh/TB4XMrwAZ/YucbCxVYcE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=plXTah2jKWBfW11x7vnwUR+9r1Ml5s+pM7gYSAQAOHqUvI/Pqvw0pTBKOYYDMUTVl hSEpu7aBGUdwwDsc+TYdo/+g5Wc38FjjdJd78CRFZBdcxmHy1qyC0qMmB4c9ykJXQq o4coFkO1E9FTm4f9sXEFymNPI4f91sGPGntuZtVs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lu Fengqi , David Sterba , Sasha Levin Subject: [PATCH 4.14 184/185] btrfs: qgroup: Drop quota_root and fs_info parameters from update_qgroup_status_item Date: Thu, 3 Oct 2019 17:54:22 +0200 Message-Id: <20191003154522.423660639@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154437.541662648@linuxfoundation.org> References: <20191003154437.541662648@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Lu Fengqi [ Upstream commit 2e980acdd829742966c6a7e565ef3382c0717295 ] They can be fetched from the transaction handle. Signed-off-by: Lu Fengqi Signed-off-by: David Sterba Signed-off-by: Sasha Levin --- fs/btrfs/qgroup.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index d6d6e9593e391..b20df81d76208 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -722,10 +722,10 @@ static int update_qgroup_info_item(struct btrfs_trans_handle *trans, return ret; } -static int update_qgroup_status_item(struct btrfs_trans_handle *trans, - struct btrfs_fs_info *fs_info, - struct btrfs_root *root) +static int update_qgroup_status_item(struct btrfs_trans_handle *trans) { + struct btrfs_fs_info *fs_info = trans->fs_info; + struct btrfs_root *quota_root = fs_info->quota_root; struct btrfs_path *path; struct btrfs_key key; struct extent_buffer *l; @@ -741,7 +741,7 @@ static int update_qgroup_status_item(struct btrfs_trans_handle *trans, if (!path) return -ENOMEM; - ret = btrfs_search_slot(trans, root, &key, path, 0, 1); + ret = btrfs_search_slot(trans, quota_root, &key, path, 0, 1); if (ret > 0) ret = -ENOENT; @@ -2110,7 +2110,7 @@ int btrfs_run_qgroups(struct btrfs_trans_handle *trans, fs_info->qgroup_flags &= ~BTRFS_QGROUP_STATUS_FLAG_ON; spin_unlock(&fs_info->qgroup_lock); - ret = update_qgroup_status_item(trans, fs_info, quota_root); + ret = update_qgroup_status_item(trans); if (ret) fs_info->qgroup_flags |= BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT; @@ -2668,7 +2668,7 @@ static void btrfs_qgroup_rescan_worker(struct btrfs_work *work) err); goto done; } - ret = update_qgroup_status_item(trans, fs_info, fs_info->quota_root); + ret = update_qgroup_status_item(trans); if (ret < 0) { err = ret; btrfs_err(fs_info, "fail to update qgroup status: %d", err); -- 2.20.1