From patchwork Tue Jan 17 22:31:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9522033 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 147126020B for ; Tue, 17 Jan 2017 22:39:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0782928426 for ; Tue, 17 Jan 2017 22:39:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F082B28602; Tue, 17 Jan 2017 22:39:39 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 A118928426 for ; Tue, 17 Jan 2017 22:39:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751345AbdAQWjh (ORCPT ); Tue, 17 Jan 2017 17:39:37 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33576 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751342AbdAQWjg (ORCPT ); Tue, 17 Jan 2017 17:39:36 -0500 Received: by mail-wm0-f65.google.com with SMTP id r144so41964805wme.0 for ; Tue, 17 Jan 2017 14:39:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RZJdtOduVFABDsqFuOpL6rObB/eipsk3LCSXmuL9Js0=; b=GmUNvY5E6IXHRFuqOYZF1xka69c0qu3iBlu3+noSM4siHusjVm3PlOs/bAkwTZMb5U ww2ncXbj6tLp7myHlbDdcRf69gKPyZtWL8duH073PtUxpyGO/RvreOtGx2ixuzPSpsx3 BH9L62/JSbyxWQJU+9FckwdMSjeMSJzfj5FOzFsAi6BYdouqyFiu2ML4/dKwItbRc4H2 OBm2LUuxYnKbfdPH4mPwtKwygp39mcpQ1Xqv2oxB7wCTSZY1M6BtTEMxwvy7TBJajbiu 5MDDkegBfgC/Yg/99aIYpEhv4P3ZyFHyHtcSpKCqA28i0jC3o0bXScYiBCrhVB23GH8+ VEbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RZJdtOduVFABDsqFuOpL6rObB/eipsk3LCSXmuL9Js0=; b=jYJo5/gKi1afFT1Uv4ug3EEf/yFj5S4zkfQXdeuydaHq4+8smDoF23Y2VmU/koz3kH ni4wnu2js5Q0sGjN91IPhNem99DtBbYjA1ivFTtlxI7mVY6qxJQv3Y4ZH1HF3N2YcEzk 9XltMrfah5C80EP1rKwIjXnMzeKiXTN3x3RxhcWkEMA8WCC3wB5bt0oc0R74cPbxk+bb vSN2FRwpsS5iXfB1THZ3lSG8Xk5P1qxPRThBEAY/XEi92pyMyYTdzDek2WYxBCIoiBlV dNrRZd91HUKnUUFSkFcL4M0HlHCsppXtBFHXmkO483eTFoTsVPoiwueilwoXXwm25VdX O2zw== X-Gm-Message-State: AIkVDXKBijhxEUSEifJ9dTHY0ZBNHG+grVdmPQDvJA9/zT5pjSzV1JsVK8Bq807WA4VWow== X-Received: by 10.28.35.65 with SMTP id j62mr302546wmj.31.1484692349622; Tue, 17 Jan 2017 14:32:29 -0800 (PST) Received: from fisk.lan (ivokamhome.ddns.nbis.net. [87.120.136.31]) by smtp.gmail.com with ESMTPSA id w197sm39980489wmd.11.2017.01.17.14.32.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Jan 2017 14:32:28 -0800 (PST) From: Nikolay Borisov To: dsterba@suse.cz Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCHv2 19/24] btrfs: Make drop_one_dir_item take btrfs_inode Date: Wed, 18 Jan 2017 00:31:45 +0200 Message-Id: <1484692310-3987-20-git-send-email-n.borisov.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1484692310-3987-1-git-send-email-n.borisov.lkml@gmail.com> References: <20170117161550.GW12081@twin.jikos.cz> <1484692310-3987-1-git-send-email-n.borisov.lkml@gmail.com> 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 Signed-off-by: Nikolay Borisov --- fs/btrfs/tree-log.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index b2c0a30811f6..35434d686653 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -843,7 +843,7 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans, static noinline int drop_one_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, - struct inode *dir, + struct btrfs_inode *dir, struct btrfs_dir_item *di) { struct btrfs_fs_info *fs_info = root->fs_info; @@ -875,7 +875,7 @@ static noinline int drop_one_dir_item(struct btrfs_trans_handle *trans, if (ret) goto out; - ret = btrfs_unlink_inode(trans, root, BTRFS_I(dir), BTRFS_I(inode), name, name_len); + ret = btrfs_unlink_inode(trans, root, dir, BTRFS_I(inode), name, name_len); if (ret) goto out; else @@ -1151,7 +1151,7 @@ static inline int __add_inode_ref(struct btrfs_trans_handle *trans, di = btrfs_lookup_dir_index_item(trans, root, path, btrfs_ino(BTRFS_I(dir)), ref_index, name, namelen, 0); if (di && !IS_ERR(di)) { - ret = drop_one_dir_item(trans, root, path, dir, di); + ret = drop_one_dir_item(trans, root, path, BTRFS_I(dir), di); if (ret) return ret; } @@ -1161,7 +1161,7 @@ static inline int __add_inode_ref(struct btrfs_trans_handle *trans, di = btrfs_lookup_dir_item(trans, root, path, btrfs_ino(BTRFS_I(dir)), name, namelen, 0); if (di && !IS_ERR(di)) { - ret = drop_one_dir_item(trans, root, path, dir, di); + ret = drop_one_dir_item(trans, root, path, BTRFS_I(dir), di); if (ret) return ret; } @@ -1769,7 +1769,7 @@ static noinline int replay_one_name(struct btrfs_trans_handle *trans, if (!exists) goto out; - ret = drop_one_dir_item(trans, root, path, dir, dst_di); + ret = drop_one_dir_item(trans, root, path, BTRFS_I(dir), dst_di); if (ret) goto out;