From patchwork Tue Jan 17 22:31:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9522019 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 0135A6020B for ; Tue, 17 Jan 2017 22:38:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E62C928426 for ; Tue, 17 Jan 2017 22:38:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D92A728602; Tue, 17 Jan 2017 22:38:50 +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 942F728426 for ; Tue, 17 Jan 2017 22:38:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751166AbdAQWis (ORCPT ); Tue, 17 Jan 2017 17:38:48 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33936 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751152AbdAQWir (ORCPT ); Tue, 17 Jan 2017 17:38:47 -0500 Received: by mail-wm0-f68.google.com with SMTP id c85so9420609wmi.1 for ; Tue, 17 Jan 2017 14:38:46 -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=WYU87rUx9QFsVIzRb3gE5pqyNbOaQMD2/ewcyOxFf6E=; b=J0u4yZNNHJMQV0ATRneN1QM9Mph2HaLY64SyhRqN1q0bprcQD+9pk6nJT9axFHSeu+ 0IA2D38hyzUft/D7TUqAp2jlXDXome0IeHiGJZHzPa1Y9+3qwZAltczTREX1eq6Smktt IS81455wbIo4Z8eKk99l1Sf3y7r3/tqXig2SgIQ8e2FL8k1AyWG8cRZpM8wIokUHA3cX GlQD/o/erj4EL+QgbeAK66uzF9GqwFXflfXY25xNO5kgctprKFsSX/NhkuB+j1yNp8y8 Dl89OdYYfEq2tIoKP8LRjoycj6AmCknEEycQ568tJAVwIeUlt4NrMKShPrPktdKQGCeW tMFQ== 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=WYU87rUx9QFsVIzRb3gE5pqyNbOaQMD2/ewcyOxFf6E=; b=Ddpomy8OqZ2xlkDSGQWqH58mtiapm98k65X8ZnSM8vUmcUtUJUw52ozA1ARgbcF0w8 CU7FmMA1797yhhz5SWoIaK9EoB+4Xo1Sz0asRzFd6O9vzoJBEUBvWDJ8aiBE9PqwD5Wr RBs0NFJchFXA8TMoEyFtEU+YKChlxMfj4hy/7zj31Awfoi+sdmCYu7Ni9/wMp90Me1SW +sKRdZ1iixpKCmGUrcqh7MFCrAeJq/qK31tUn5EE+FaNAeAXkUYsZn8uxblTLjzjgdmU Q/PFI9i/HWTsVg+oLIdiZ5IXdrHjnhcsVR6dVls53ggvrCjN6FIbQJxkUygV92d80CZE y+NA== X-Gm-Message-State: AIkVDXK3ZPSbLt/ZZa8qhaORrVMf5JQff2q2FjBDdyWzjcaWpb/A3P4KRH4hWQ3osR/lag== X-Received: by 10.223.177.134 with SMTP id q6mr11007876wra.83.1484692333360; Tue, 17 Jan 2017 14:32:13 -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.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Jan 2017 14:32:12 -0800 (PST) From: Nikolay Borisov To: dsterba@suse.cz Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCHv2 08/24] btrfs: Make logged_inode_size take btrfs_inode Date: Wed, 18 Jan 2017 00:31:34 +0200 Message-Id: <1484692310-3987-9-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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index a7705173150e..20718cfebf89 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -4241,13 +4241,13 @@ static int btrfs_log_changed_extents(struct btrfs_trans_handle *trans, return ret; } -static int logged_inode_size(struct btrfs_root *log, struct inode *inode, +static int logged_inode_size(struct btrfs_root *log, struct btrfs_inode *inode, struct btrfs_path *path, u64 *size_ret) { struct btrfs_key key; int ret; - key.objectid = btrfs_ino(BTRFS_I(inode)); + key.objectid = btrfs_ino(inode); key.type = BTRFS_INODE_ITEM_KEY; key.offset = 0; @@ -4699,7 +4699,7 @@ static int btrfs_log_inode(struct btrfs_trans_handle *trans, * (zeroes), as if an expanding truncate happened, * instead of getting a file of 4Kb only. */ - err = logged_inode_size(log, inode, path, + err = logged_inode_size(log, BTRFS_I(inode), path, &logged_isize); if (err) goto out_unlock;