From patchwork Tue Jan 17 22:31: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: 9522065 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 931A66020B for ; Tue, 17 Jan 2017 22:42:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86FCF28592 for ; Tue, 17 Jan 2017 22:42:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BC99285F0; Tue, 17 Jan 2017 22:42:00 +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 3018228592 for ; Tue, 17 Jan 2017 22:42:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751417AbdAQWl5 (ORCPT ); Tue, 17 Jan 2017 17:41:57 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33944 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750863AbdAQWlN (ORCPT ); Tue, 17 Jan 2017 17:41:13 -0500 Received: by mail-wm0-f66.google.com with SMTP id c85so9428995wmi.1 for ; Tue, 17 Jan 2017 14:40:23 -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=sfBa+bTHh9D1AvOva/GU0UJpA/0cxoBDIAPP7xlxjLc=; b=CI+TrAuHaQe/wi+GC6gvvQyrNgTRiIecybLK4Wncly3ypVtPq+nPmvSrqAeLoE8HaP ThNNCRdObHPrWPfrVz1vw7csEDaluTKsQnMSltE+st8NF34c95ZO7MWe4Nz6ueDbs8x9 +93qWez2p49+PlvSbgCcITO5wwM2cv3T53Lh1lYi3+XByNuRcWoF55bjIjF1+E0syXhD AQADDv/+KDvgeLQeKDO9Q/bad0iLyPS+KsjhNAzNs8mySOon3rUuklrPm0v8Ye/0LOP1 /nXF9F+4p8aZ2MyC/3ttUlb45GMz3szI0Ga97V+OsaAXe/E1mv5OwwUULTwwWAuRqdcM 1xew== 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=sfBa+bTHh9D1AvOva/GU0UJpA/0cxoBDIAPP7xlxjLc=; b=Plew++3EchANu3ayzH9/TiUccbk95Lpq2EOX0rBu13bC8uHa+rG9cHNeOqMdnsIZwP 1E1uhWD5lFssKJaH0XVbzm4L7vrgmINTs9WSx+Iwb/wvhquyKQYOzWN1vEPdQTNuV/5k nghT2xZXWOhcHQvEsYSBBeHWFNdkrLPhsl7LqFDekkjGHVDLzYLgGFa6rXnxViKs3lla Wb2ANcgi8tAyBYnOxRcH3hj82T9RxKJQ18xUVcPEEbshb7PoYscZXIG4WWHEyKwAV3Jd IeJoH6sAMSYmzIF0wA/kHr7V9OTmb1xkp4LuOKSn4Hlfb2X0kBuPKOyJW1WY2fyBkB4v gcng== X-Gm-Message-State: AIkVDXKhmIU/o1ForibKpvMf3eSKYxUpzZt/sYzaTn1Sq2iVJoteJzDYXqfVONEXVVRJ1A== X-Received: by 10.223.161.130 with SMTP id u2mr12427483wru.127.1484692346360; Tue, 17 Jan 2017 14:32:26 -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.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Jan 2017 14:32:25 -0800 (PST) From: Nikolay Borisov To: dsterba@suse.cz Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCHv2 17/24] btrfs: Make log_new_dir_dentries take btrfs_inode Date: Wed, 18 Jan 2017 00:31:43 +0200 Message-Id: <1484692310-3987-18-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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 38cda7869bf9..b0cc56fe86e9 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -5155,7 +5155,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; @@ -5174,7 +5174,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)) { @@ -5368,7 +5368,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; @@ -5531,7 +5531,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: