From patchwork Thu Jan 12 14:00:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9513277 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 3FDCB60710 for ; Thu, 12 Jan 2017 14:01:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E2DC286B9 for ; Thu, 12 Jan 2017 14:01:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 23164286DA; Thu, 12 Jan 2017 14:01:53 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 B8BB3286D4 for ; Thu, 12 Jan 2017 14:01:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751150AbdALOBu (ORCPT ); Thu, 12 Jan 2017 09:01:50 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34227 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750746AbdALOBP (ORCPT ); Thu, 12 Jan 2017 09:01:15 -0500 Received: by mail-wm0-f68.google.com with SMTP id c85so3882583wmi.1 for ; Thu, 12 Jan 2017 06:01:15 -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=Vzp/f59+T9CviAJZrQ+up+X4UyRLCYB6NvP1fFuCymk=; b=ZTii037Y7k1Gloi/P9fh+W/dy3ks1bBtW6EGlZZ92Vp1VRcTTwb5XiEzTze00vJg8O zVG5bUN2J6qv/49ADx+YDVFKFZSCRFAA1c5uodPuc409upkpRaVZLl0uq2pRUbyAryfZ CuYjU+mYgfsrmQf5EvrfmlMJq3jqmidcCADiUuVbpBp+1D6foKud8eOBlA+Bx5CnbgFa o7oOI+FaK7bKxOC55ass46Q+Kb6H99A0eOuQb/kB5fFQlSCvtEUBQCj50W0ZMI0DyJ1Y ipQ0nFoMty7mCuriPFZSzeWIMf1wQMGYqBTeBa4fNy8cUj74fblOLI8bGDyvGWUwXJb2 y+Ow== 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=Vzp/f59+T9CviAJZrQ+up+X4UyRLCYB6NvP1fFuCymk=; b=WOO/jN0IZDJX8FootjtZIvGfGR5XpjQ4AfTA42x/Fkmg5npOTe52sknxSch+g/qDf1 p7Bq6GlNJ30jLv3HjiNBCfy5jZT+2ClSq/893bj1cx45G7T20Wdggrw0kbO40MxiwEPn /D49c0b9+xX8uojkbvmrSewzj93Um6VOFuieucmMtimjeslDPfU/5BAl4K7X/e3zxXkS VEPYofh3ZOy4IvJGBr2GvUFEUIg6m0cPqPZdG0ljSH2M+L+OQjqX/lPHF8XIiF4uahO7 x1I+oaROnvHs3W1QIbHXmCLUtrD0E+9uxkbOXVlDah2USr4UikFuYNwJgrzt/w6UysQz uAFw== X-Gm-Message-State: AIkVDXLMjPf72BuI9f8NvquCxRZ8nYl/yuxDitMA6McYiT9eTHpkIFVgGCruZmz0eske+Q== X-Received: by 10.223.150.118 with SMTP id c51mr8616882wra.190.1484229674220; Thu, 12 Jan 2017 06:01:14 -0800 (PST) Received: from fisk.lan (ivokamhome.ddns.nbis.net. [87.120.136.31]) by smtp.gmail.com with ESMTPSA id y145sm725670wmc.17.2017.01.12.06.01.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Jan 2017 06:01:13 -0800 (PST) From: Nikolay Borisov To: dsterba@suse.com Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCH 17/24] btrfs: Make log_new_dir_dentries take btrfs_inode Date: Thu, 12 Jan 2017 16:00:43 +0200 Message-Id: <1484229650-24554-18-git-send-email-n.borisov.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1484229650-24554-1-git-send-email-n.borisov.lkml@gmail.com> References: <1484229650-24554-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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 7a500ff14681..94f2e1c705b2 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -5148,7 +5148,7 @@ struct btrfs_dir_list { */ static int log_new_dir_dentries(struct btrfs_trans_handle *trans, struct btrfs_root *root, - struct inode *start_inode, + struct btrfs_inode *start_inode, struct btrfs_log_ctx *ctx) { struct btrfs_fs_info *fs_info = root->fs_info; @@ -5167,7 +5167,7 @@ static int log_new_dir_dentries(struct btrfs_trans_handle *trans, btrfs_free_path(path); return -ENOMEM; } - dir_elem->ino = btrfs_ino(BTRFS_I(start_inode)); + dir_elem->ino = btrfs_ino(start_inode); list_add_tail(&dir_elem->list, &dir_list); while (!list_empty(&dir_list)) { @@ -5361,7 +5361,7 @@ static int btrfs_log_all_parents(struct btrfs_trans_handle *trans, ret = 1; if (!ret && ctx && ctx->log_new_dentries) ret = log_new_dir_dentries(trans, root, - dir_inode, ctx); + BTRFS_I(dir_inode), ctx); iput(dir_inode); if (ret) goto out; @@ -5524,7 +5524,7 @@ static int btrfs_log_inode_parent(struct btrfs_trans_handle *trans, old_parent = parent; } if (log_dentries) - ret = log_new_dir_dentries(trans, root, orig_inode, ctx); + ret = log_new_dir_dentries(trans, root, BTRFS_I(orig_inode), ctx); else ret = 0; end_trans: