From patchwork Mon Jan 30 20:23:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Bo X-Patchwork-Id: 9546079 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D707B604A0 for ; Mon, 30 Jan 2017 20:25:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B70F72818B for ; Mon, 30 Jan 2017 20:25:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC2E4281D2; Mon, 30 Jan 2017 20:25:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 738C4281A7 for ; Mon, 30 Jan 2017 20:25:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752801AbdA3UZ1 (ORCPT ); Mon, 30 Jan 2017 15:25:27 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:31760 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752558AbdA3UZ0 (ORCPT ); Mon, 30 Jan 2017 15:25:26 -0500 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v0UKOcT6030009 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Jan 2017 20:24:38 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v0UKOb2W021752 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Jan 2017 20:24:38 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v0UKObFK031056; Mon, 30 Jan 2017 20:24:37 GMT Received: from localhost.us.oracle.com (/10.211.47.181) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 30 Jan 2017 12:24:37 -0800 From: Liu Bo To: linux-btrfs@vger.kernel.org Cc: David Sterba Subject: [PATCH] Btrfs: remove unused trans in read_block_for_search Date: Mon, 30 Jan 2017 12:23:42 -0800 Message-Id: <1485807822-16386-1-git-send-email-bo.li.liu@oracle.com> X-Mailer: git-send-email 2.5.5 X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP @trans is not used at all, this removes it. Signed-off-by: Liu Bo Reviewed-by: David Sterba --- fs/btrfs/ctree.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index a426dc8..dd8014a 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -2437,10 +2437,9 @@ noinline void btrfs_unlock_up_safe(struct btrfs_path *path, int level) * reada. -EAGAIN is returned and the search must be repeated. */ static int -read_block_for_search(struct btrfs_trans_handle *trans, - struct btrfs_root *root, struct btrfs_path *p, - struct extent_buffer **eb_ret, int level, int slot, - struct btrfs_key *key, u64 time_seq) +read_block_for_search(struct btrfs_root *root, struct btrfs_path *p, + struct extent_buffer **eb_ret, int level, int slot, + struct btrfs_key *key, u64 time_seq) { struct btrfs_fs_info *fs_info = root->fs_info; u64 blocknr; @@ -2870,8 +2869,8 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root goto done; } - err = read_block_for_search(trans, root, p, - &b, level, slot, key, 0); + err = read_block_for_search(root, p, &b, level, + slot, key, 0); if (err == -EAGAIN) goto again; if (err) { @@ -3014,7 +3013,7 @@ int btrfs_search_old_slot(struct btrfs_root *root, struct btrfs_key *key, goto done; } - err = read_block_for_search(NULL, root, p, &b, level, + err = read_block_for_search(root, p, &b, level, slot, key, time_seq); if (err == -EAGAIN) goto again; @@ -5784,7 +5783,7 @@ int btrfs_next_old_leaf(struct btrfs_root *root, struct btrfs_path *path, next = c; next_rw_lock = path->locks[level]; - ret = read_block_for_search(NULL, root, path, &next, level, + ret = read_block_for_search(root, path, &next, level, slot, &key, 0); if (ret == -EAGAIN) goto again; @@ -5834,7 +5833,7 @@ int btrfs_next_old_leaf(struct btrfs_root *root, struct btrfs_path *path, if (!level) break; - ret = read_block_for_search(NULL, root, path, &next, level, + ret = read_block_for_search(root, path, &next, level, 0, &key, 0); if (ret == -EAGAIN) goto again;