From patchwork Tue Jan 17 22:31:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9522039 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 598246020B for ; Tue, 17 Jan 2017 22:40:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C2C128426 for ; Tue, 17 Jan 2017 22:40:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F9EC28602; Tue, 17 Jan 2017 22:40:02 +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 ECBA828426 for ; Tue, 17 Jan 2017 22:40:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751366AbdAQWkA (ORCPT ); Tue, 17 Jan 2017 17:40:00 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34712 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751353AbdAQWj7 (ORCPT ); Tue, 17 Jan 2017 17:39:59 -0500 Received: by mail-wm0-f68.google.com with SMTP id c85so9426718wmi.1 for ; Tue, 17 Jan 2017 14:39:58 -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=mbbOD+SpPjUDjNf5PX5VWsqM52lQx0haXa0uVDGBCOI=; b=ewbWSCNiPlRUH13aAmOR+wUZ0l7uGiFAEzjuba6XS3ZAVYhRO3BLbprJ48HoZkhrwr 66DDe9mpDwuarZblv/TX3oGBYJMFPhnWqB1fjZJR4qeIOCyZisO9EPkWBpSS54S62Ygf LBv+2yFm/ME4xfIa+WIjL1fjJLTjlFa0BMDrsGHdFia+fn+j1pNTQatMiSCKj8+lGcI3 vbgYZHkw+rAuHI8u08wZ0aMaOY2KwwHEGE13GkRZBLYQWiTdIiSr/JhPEdphk8CDFf4S zS8CnTumzy4HFvNUFP2ZEDY+9ZPECHKQ3V+B9AzcF/69RzuRG3bs31tfH7b+amTKJGOp yyFg== 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=mbbOD+SpPjUDjNf5PX5VWsqM52lQx0haXa0uVDGBCOI=; b=nZ0+vqED5sXFVLhNjMdhEtx8bcqkUU+OcCFF8Wjx2xPIBiqlRJpaHTKsHwsLHYm8UB IUFznL/55aAHq1XcrCwIzhOqwHkz0X2J3oJRj5cD19QK8gzheBUTIHfvf1Nz52Ugc1zH Xb4QN4zA+0cxmV+HLUvAJDhAVzuG4mzgVZbjgpZOjgLjXyytVtFR53qZq9qEcbMJLP0v RoqjMC4DNWMsqvREs6bK5UYPhfxKKIj+fMNin4FkUJkcC3CahTHxXSqfNLDEygQIyX7L IOFs+veyRdjYouTkjz/AN1Sxe00p7MjNgrGFPP5VSxaXfIkRHRGaZ94VGwnLGESxRvut DVyw== X-Gm-Message-State: AIkVDXLQVje+ErpomjHP2owa2rvzozTQHVFg610u8GNVwEVHkMcs66qgu+hrc49QflIyAw== X-Received: by 10.223.162.211 with SMTP id t19mr12139680wra.57.1484692334937; Tue, 17 Jan 2017 14:32:14 -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.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Jan 2017 14:32:14 -0800 (PST) From: Nikolay Borisov To: dsterba@suse.cz Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCHv2 09/24] btrfs: Make btrfs_check_ref_name_override take btrfs_inode Date: Wed, 18 Jan 2017 00:31:35 +0200 Message-Id: <1484692310-3987-10-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 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 20718cfebf89..7669e95be423 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -4495,7 +4495,7 @@ static int btrfs_log_trailing_hole(struct btrfs_trans_handle *trans, static int btrfs_check_ref_name_override(struct extent_buffer *eb, const int slot, const struct btrfs_key *key, - struct inode *inode, + struct btrfs_inode *inode, u64 *other_ino) { int ret; @@ -4551,9 +4551,8 @@ static int btrfs_check_ref_name_override(struct extent_buffer *eb, } read_extent_buffer(eb, name, name_ptr, this_name_len); - di = btrfs_lookup_dir_item(NULL, BTRFS_I(inode)->root, - search_path, parent, - name, this_name_len, 0); + di = btrfs_lookup_dir_item(NULL, inode->root, search_path, + parent, name, this_name_len, 0); if (di && !IS_ERR(di)) { struct btrfs_key di_key; @@ -4769,7 +4768,7 @@ static int btrfs_log_inode(struct btrfs_trans_handle *trans, ret = btrfs_check_ref_name_override(path->nodes[0], path->slots[0], - &min_key, inode, + &min_key, BTRFS_I(inode), &other_ino); if (ret < 0) { err = ret;