From patchwork Thu Jan 12 14:00: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: 9513253 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 F0B6D60710 for ; Thu, 12 Jan 2017 14:01:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DFAF3286B9 for ; Thu, 12 Jan 2017 14:01:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D493B286D9; Thu, 12 Jan 2017 14:01:09 +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 857AD286B9 for ; Thu, 12 Jan 2017 14:01:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750996AbdALOBH (ORCPT ); Thu, 12 Jan 2017 09:01:07 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36223 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750873AbdALOBF (ORCPT ); Thu, 12 Jan 2017 09:01:05 -0500 Received: by mail-wm0-f65.google.com with SMTP id r126so3894665wmr.3 for ; Thu, 12 Jan 2017 06:01:04 -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=GxR70c8R+3w5mWJaZFDdcWlVGOYqLdU0K4aGopBsWDA=; b=HJR4UU5BCCBXAlTBjO86tzuKWV2QZNSQykkw5aEHFqmciuUifaEBBq7frlRfIL7Qm+ C6wPDQg/NaDrQctMZQrTyKYFp0oNqzODU4tINlyMW6TJc44nDZvzj6o+2KWFk1GPeuup 8gOg1Y3MZLuImA+sNq0DQunjITWLl6/jzoFAM38Bge8K/xJh9peop1WGuLyy5mRtOy9W l+EEr96Gku7qIRZIi2TT1gTnGeU/pbp8iZSEj/Lhh5FHoOEtrAgWnEp6Wn7NCGBLAokc 3cY7Sh9DuSU3EEGgOQQK5md/bmdp2maduKO7W4jpDT6TVYnjqP7NJI29sYv2uZiZ0EnY 9Rww== 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=GxR70c8R+3w5mWJaZFDdcWlVGOYqLdU0K4aGopBsWDA=; b=tziT2/xlpKcyVxtaRgBrkoC/QK0DMq+FZaQvUQapW+6CQjkfAI77XPagVxHDXWdpt6 Jr+e05PKJ0Wcugh+VfIreuL2tzD/BUx3PlRXRjz2Opq5XPxZPcjeV3MLjAmJt9DVLFpo iTL13i4XAeoAHNZWwqhbenE5WHvSTiBQMTqQVReC/MN3qt87fS9TDwfXlXWg4NgQ1LfJ hoMuBz8uvxq7Ln1YlhB20rl5glhDBUyWiumfeig52b+SIHsgW2Jgpw50/Ge3YL1zqNhm xSWfn8/ql4B0hsX0ZTfmr+qFVpUBjCiYvnRPmz4qNh3FJI9n+Jvidlefbjt6yluAvXyn pKfg== X-Gm-Message-State: AIkVDXKgghDg/69lmufSva7eeBwXn46Xy9wYZ/tIAbGjR5E2Sd1Vll/5zjTTb6yhj+3Z4A== X-Received: by 10.28.199.73 with SMTP id x70mr7999819wmf.42.1484229664131; Thu, 12 Jan 2017 06:01:04 -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.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Jan 2017 06:01:03 -0800 (PST) From: Nikolay Borisov To: dsterba@suse.com Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCH 09/24] btrfs: Make btrfs_check_ref_name_override take btrfs_inode Date: Thu, 12 Jan 2017 16:00:35 +0200 Message-Id: <1484229650-24554-10-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 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 0fc963454c82..2b44835b4dea 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -4494,7 +4494,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; @@ -4550,9 +4550,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; @@ -4762,7 +4761,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;