From patchwork Thu Jan 12 14:00:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9513275 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 AF54E60710 for ; Thu, 12 Jan 2017 14:01:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A97E2868C for ; Thu, 12 Jan 2017 14:01:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F899286DB; Thu, 12 Jan 2017 14:01:45 +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 8F2212868C for ; Thu, 12 Jan 2017 14:01:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751114AbdALOBc (ORCPT ); Thu, 12 Jan 2017 09:01:32 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36448 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751069AbdALOBU (ORCPT ); Thu, 12 Jan 2017 09:01:20 -0500 Received: by mail-wm0-f65.google.com with SMTP id r126so3896210wmr.3 for ; Thu, 12 Jan 2017 06:01:20 -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=A/JP0FOZTMQuf9lbmN0IDlqI8PmjqV7pwFyUJyFMKIw=; b=iplawNvSJvYpIIJZqiQ42iKbQ9gWeLLXxlYNRGDcHRqGszilzdvwLHnBcx3CuaNRyp hYTnzO+xobYOZjgkFtErA9Rq3rRPHxdmyTc5zo/5eOa9QUEQly8EdstTIbgMTnV+1KSS Gz3tOYdytLuyqJfjwqlP8U2MuUSMbZ1vjWWIRJzPaONIq63RvlTjncuW0aJCv/b0xWmY VZV9qO/b/bgISS31vxy2nljL313AwOr+pxGdHQGOdlReKnyA09+APtZtTq/UfGREUoFg vniLkiqyQ1l+wE7hlS1i2AmssW4Fm5M+c0suyMM//Tw73Ljn10UM8b0th7bfbUI7irzL byUQ== 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=A/JP0FOZTMQuf9lbmN0IDlqI8PmjqV7pwFyUJyFMKIw=; b=GvRM21G4gHoyNaVwguQU3lq0bcKvCr6KIDpqRee2fHReVniWF0hhS4JsiJ5HFYudke c4Etnw0+cSkCHhKrPt/YaOKJ78ExBskWstOtY2eKZ48Jzo7aK79cYU6Ey5UMKvsZkWKL pp/9G60sC4e1G5v4T/0fXDAVcx0uxpO+BsR9uu0ywwJat5pXhyIQAR08HCGTkiC+EcEC fq1Jg2boQfcqeVm/1THrrET8ucmXECb5yCqrfhgnKYhzTrNUBnGcuKgQW4xwlMSnu7OH VrVJWmreCY5F1yBvduK/86md7a93cjrk/17DLGtuSU747EACeHl3UFRufYLGY6p7wQr/ F0+A== X-Gm-Message-State: AIkVDXJpLrjrba//I5UJT1dGuX6mFIWPQ+brYzT7GTE+vrZvdcbklszGNV5KWrbkYtuUzw== X-Received: by 10.194.179.166 with SMTP id dh6mr8723345wjc.187.1484229678007; Thu, 12 Jan 2017 06:01:18 -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.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Jan 2017 06:01:17 -0800 (PST) From: Nikolay Borisov To: dsterba@suse.com Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCH 21/24] btrfs: Make log_inode_item take btrfs_inode Date: Thu, 12 Jan 2017 16:00:47 +0200 Message-Id: <1484229650-24554-22-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 a24983cd455c..002db48541ff 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -3591,19 +3591,18 @@ static void fill_inode_item(struct btrfs_trans_handle *trans, static int log_inode_item(struct btrfs_trans_handle *trans, struct btrfs_root *log, struct btrfs_path *path, - struct inode *inode) + struct btrfs_inode *inode) { struct btrfs_inode_item *inode_item; int ret; ret = btrfs_insert_empty_item(trans, log, path, - &BTRFS_I(inode)->location, - sizeof(*inode_item)); + &inode->location, sizeof(*inode_item)); if (ret && ret != -EEXIST) return ret; inode_item = btrfs_item_ptr(path->nodes[0], path->slots[0], struct btrfs_inode_item); - fill_inode_item(trans, path->nodes[0], inode_item, inode, 0, 0); + fill_inode_item(trans, path->nodes[0], inode_item, &inode->vfs_inode, 0, 0); btrfs_release_path(path); return 0; } @@ -4923,7 +4922,7 @@ static int btrfs_log_inode(struct btrfs_trans_handle *trans, btrfs_release_path(path); btrfs_release_path(dst_path); if (need_log_inode_item) { - err = log_inode_item(trans, log, dst_path, inode); + err = log_inode_item(trans, log, dst_path, BTRFS_I(inode)); if (err) goto out_unlock; }