From patchwork Tue Jan 10 18:35:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9508307 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 507BF60231 for ; Tue, 10 Jan 2017 18:36:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47D3328596 for ; Tue, 10 Jan 2017 18:36:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3CA572859E; Tue, 10 Jan 2017 18:36:25 +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 DF8522858A for ; Tue, 10 Jan 2017 18:36:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939187AbdAJSgF (ORCPT ); Tue, 10 Jan 2017 13:36:05 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34212 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751298AbdAJSgB (ORCPT ); Tue, 10 Jan 2017 13:36:01 -0500 Received: by mail-wm0-f65.google.com with SMTP id c85so31527511wmi.1 for ; Tue, 10 Jan 2017 10:36:00 -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=Vf++4qwJ6PWyavkSGw4nkbeKm7MLNrsGcOaqngnjCKo=; b=a5YgxLwYthlgRIp/JgyvM60CnKErZeMtcRX6+ZlCJBuysBhz+bmZ8+sJ1FLAR1wSJU a4yVUxLDM2k55UxXU7xmfvzG1/SDPzMdPmPFk+SQOD/KOhDk9RW3t7m6Do0L2BgddxD5 342fGB3F7yk0hTM22ve/eyMi1ExbB9DWOG0QxlLdePLiwIbRp1mYiDEvYRB0aMdYoePY POPQsdRTxN9LQY2Jb/I8PpbYoScBXL7tN25xxlor5K5pOuP7JAqaH+p3VSmVKe+sVx7D wg+zyT6myjHVLx4MQVDzuoWAK6Zsd/HY9PyUZf9IDX1Un0PBH5M6ZpMN5vdE2QlXDhOu sxeg== 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=Vf++4qwJ6PWyavkSGw4nkbeKm7MLNrsGcOaqngnjCKo=; b=btcTKGNSxyRFRmaHBI8L+q5a6YAZH4hEcovkhYNqV00BB7IgHt2HgHpl/41Xl9IiQt dOhIlzNPbLNKWcpWNEB4lxh84U0HLas5inUHfXW45IvbS+L2MasRPrhHfnr+qZsz0UNz ikHHp0E+g96y4Q8/xTc7Hmq/D4M5yCjfPWkt3NJss8jR0nIspIR+VxrsWtSmUmwwRoe0 wzDAZaKQlOv/7pZXc67LwEONDwz9d1Rj5uqOAgEeT/GyZb0L4Xl6EooGJ3Gh2XO63Grp QOA4ABc+B+etMpWf8Y+/fBZb8Vo6oRt0MXFuwKLmVOgsjQJZJNIbg6WXlLc43HmOlasU j2tw== X-Gm-Message-State: AIkVDXKt24qnxLuoxPNFt0R+va5kNp0AZljmL2H/e94wxJuS6cPalfxklEEhP9vYblcY+g== X-Received: by 10.223.154.43 with SMTP id z40mr2787980wrb.176.1484073359733; Tue, 10 Jan 2017 10:35:59 -0800 (PST) Received: from fisk.lan (ivokamhome.ddns.nbis.net. [87.120.136.31]) by smtp.gmail.com with ESMTPSA id jm6sm4572626wjb.27.2017.01.10.10.35.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Jan 2017 10:35:59 -0800 (PST) From: Nikolay Borisov To: linux-btrfs@vger.kernel.org Cc: Nikolay Borisov Subject: [PATCH 07/12] btrfs: Make btrfs_delayed_delete_inode_ref take btrfs_inode Date: Tue, 10 Jan 2017 20:35:37 +0200 Message-Id: <1484073342-28854-8-git-send-email-n.borisov.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1484073342-28854-1-git-send-email-n.borisov.lkml@gmail.com> References: <1484073342-28854-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/delayed-inode.c | 6 +++--- fs/btrfs/delayed-inode.h | 2 +- fs/btrfs/inode.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index c7b40613e31c..3adf47427451 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c @@ -1854,9 +1854,9 @@ int btrfs_delayed_update_inode(struct btrfs_trans_handle *trans, return ret; } -int btrfs_delayed_delete_inode_ref(struct inode *inode) +int btrfs_delayed_delete_inode_ref(struct btrfs_inode *inode) { - struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); + struct btrfs_fs_info *fs_info = btrfs_sb(inode->vfs_inode.i_sb); struct btrfs_delayed_node *delayed_node; /* @@ -1867,7 +1867,7 @@ int btrfs_delayed_delete_inode_ref(struct inode *inode) if (test_bit(BTRFS_FS_LOG_RECOVERING, &fs_info->flags)) return -EAGAIN; - delayed_node = btrfs_get_or_create_delayed_node(BTRFS_I(inode)); + delayed_node = btrfs_get_or_create_delayed_node(inode); if (IS_ERR(delayed_node)) return PTR_ERR(delayed_node); diff --git a/fs/btrfs/delayed-inode.h b/fs/btrfs/delayed-inode.h index adf6a8a0b23a..dbb02f4d5dda 100644 --- a/fs/btrfs/delayed-inode.h +++ b/fs/btrfs/delayed-inode.h @@ -129,7 +129,7 @@ int btrfs_commit_inode_delayed_inode(struct inode *inode); int btrfs_delayed_update_inode(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct inode *inode); int btrfs_fill_inode(struct inode *inode, u32 *rdev); -int btrfs_delayed_delete_inode_ref(struct inode *inode); +int btrfs_delayed_delete_inode_ref(struct btrfs_inode *inode); /* Used for drop dead root */ void btrfs_kill_all_delayed_nodes(struct btrfs_root *root); diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index d5ca388ae710..8e259c3ae4dd 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4044,7 +4044,7 @@ static int __btrfs_unlink_inode(struct btrfs_trans_handle *trans, * we update the inode item. */ if (BTRFS_I(inode)->dir_index) { - ret = btrfs_delayed_delete_inode_ref(inode); + ret = btrfs_delayed_delete_inode_ref(BTRFS_I(inode)); if (!ret) { index = BTRFS_I(inode)->dir_index; goto skip_backref;