From patchwork Thu Jan 12 14:00:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9513269 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 C76F860762 for ; Thu, 12 Jan 2017 14:01:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA54B286B9 for ; Thu, 12 Jan 2017 14:01:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF528286D5; Thu, 12 Jan 2017 14:01:29 +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 60F4C286D9 for ; Thu, 12 Jan 2017 14:01:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751095AbdALOB2 (ORCPT ); Thu, 12 Jan 2017 09:01:28 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36471 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751078AbdALOBV (ORCPT ); Thu, 12 Jan 2017 09:01:21 -0500 Received: by mail-wm0-f66.google.com with SMTP id r126so3896441wmr.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=5sqpsH5xXLi6EId2M+2G74XYae+5zCmRUaAKGBs47VM=; b=bKcZ5dBOo+P/c7pFsAmGbxu9z/CfiytK+If9ePK1FzIxV4W8PZsqVobD5S8dKbkPnE FGXCpogPwJwylEpE+2DTlgal2HQommJwTKxj4x1MniEXYO2YFCgiktXvPGsJPEcFRM0v k5eozu1oN4Zl7pn4CfFPtT3rQFO/KfusyTZ3dAAypRZzOE8KHXCdneIFBGEUkFoUyTzw 5NUkd4Vn1Np8GZkLkE9Uf6Nx6CNBYu+EeKF3+eBqfYgOi0Xy1pNwK3RiACP7nCTTE+kb EDU7Sc99zcHAFbruyLUYPpoBlaUxgpUEyx1N3d9BTh/AaLzI7/xym1IzwN55WQ22B5TL IkdA== 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=5sqpsH5xXLi6EId2M+2G74XYae+5zCmRUaAKGBs47VM=; b=kaLRgYXsJgbmJMzsozFqdhGH5+2EvF8x+KPiN+PsfNKQhVsqRlHahPGrtDjeky7reH uroXMwJSNx41j4koiv/d2Rf/jshiNksClmtHw+kDi6LKaZ9Wg9PE9YavEtzPhXJ2s1Dm 0mowoY+3eW4TBhOlJ/4KRmweP599ntO0nbSG6VdBhLxr+IySCXmBXa8F2jqw3jSNsSQ2 yXMAmyOC5dxdFh0g6sPA7mTpSOUPIS6f5XsnTP7APRUClZNrT+D3BsInOXrcWkksTtcT uOo/Ro9OX2lUf1R8TaM6HMcrZJCWpb+4ctpPaDyOgtTbEdQ/o6i5tgEIuDwZha3Z8og8 7KGg== X-Gm-Message-State: AIkVDXIt9JcKBJhC8kSnpImd3ovSjiqSYle9KIpnuI8TufEBaaN6+kE3ykfE5urECX2Y0Q== X-Received: by 10.28.27.67 with SMTP id b64mr323538wmb.126.1484229679899; Thu, 12 Jan 2017 06:01:19 -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.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Jan 2017 06:01:19 -0800 (PST) From: Nikolay Borisov To: dsterba@suse.com Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCH 23/24] btrfs: Make count_inode_extrefs take btrfs_inode Date: Thu, 12 Jan 2017 16:00:49 +0200 Message-Id: <1484229650-24554-24-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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 172faaed2658..0c5eb664640f 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -1357,14 +1357,14 @@ static int insert_orphan_item(struct btrfs_trans_handle *trans, } static int count_inode_extrefs(struct btrfs_root *root, - struct inode *inode, struct btrfs_path *path) + struct btrfs_inode *inode, struct btrfs_path *path) { int ret = 0; int name_len; unsigned int nlink = 0; u32 item_size; u32 cur_offset = 0; - u64 inode_objectid = btrfs_ino(BTRFS_I(inode)); + u64 inode_objectid = btrfs_ino(inode); u64 offset = 0; unsigned long ptr; struct btrfs_inode_extref *extref; @@ -1486,7 +1486,7 @@ static noinline int fixup_inode_link_count(struct btrfs_trans_handle *trans, nlink = ret; - ret = count_inode_extrefs(root, inode, path); + ret = count_inode_extrefs(root, BTRFS_I(inode), path); if (ret < 0) goto out;