From patchwork Fri Feb 17 14:43:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9579989 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 0CAA3600F6 for ; Fri, 17 Feb 2017 14:44:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F12C8286F3 for ; Fri, 17 Feb 2017 14:44:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6366286F7; Fri, 17 Feb 2017 14:44:35 +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 99315286F3 for ; Fri, 17 Feb 2017 14:44:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934581AbdBQOod (ORCPT ); Fri, 17 Feb 2017 09:44:33 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35504 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934464AbdBQOoZ (ORCPT ); Fri, 17 Feb 2017 09:44:25 -0500 Received: by mail-wm0-f67.google.com with SMTP id u63so2927665wmu.2 for ; Fri, 17 Feb 2017 06:44:24 -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=e1Us2/APwHgzeJAQBOppEkpsFrakg/53KlgnHaIIa9I=; b=C0ObY7Bkr4lWD1ovnLKYodBy6BPjIvkpHgm6OpfriS0p3vYhzQ4iti4fLiW83p1bWH +K/Qy2oWidalwiPloyEUB80MC1r8hzz8PjIazWDDuQIet6McBhX0K3jzxeXiI+JWmDfM 2oWTl8FXAlz5RnCxOYL9jlYi/PxB0sGT8hGY9f80rLq4ZCZMeJhvW/gzR25z5ak1MRQ/ IAnFWeBpILaQCzX51vHv06wXK/nSG9g942Nv497tes5wLTF2PI3ElHWe/anIpl445sZr t1HObjZAf9BVJfvJPqGKzFL4fP1FwQb+xRF/xD0dneAIRVxY2R1SSJNfmCUblz7twZwh 5wBw== 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=e1Us2/APwHgzeJAQBOppEkpsFrakg/53KlgnHaIIa9I=; b=BwF7+8IR26kR8aXiNMjIZWbHtdjhchpHFjldHdreim9sp5xFepls6DFSj0knIZx5Pt VnetANFj++15WFx7PubvrEyyTR+uMez7njcEluDxersoHmPVR7a6bZJ4mwM4YH+GMs90 5x6nY3ddy07teeaZ3RvLWGBkimyerNDOOh27NzFrNpVbiwzghiTrNQnWuVyILZp4yXm3 pM74Wo2EISFauFrKBWIJtPUrJClBchvLE93csCF1LYxZTrymx/eac9OFFt2IxpvgNtgJ rwqmdYwZteWlxcqZ+9cdtqwKWvmMseOPy3g8PHN3aiEzhJqoC5pGb+qjlLyn+Bm8e801 6dqA== X-Gm-Message-State: AMke39mijMj9wXEMHqi4/q358wcwYuIg4ADdWpWG9x3BmtQa8ODpPA92TNGnsnNnlkSbyg== X-Received: by 10.28.174.14 with SMTP id x14mr3883659wme.75.1487342664178; Fri, 17 Feb 2017 06:44:24 -0800 (PST) Received: from fisk.suse.de (ivokamhome.ddns.nbis.net. [87.120.136.31]) by smtp.gmail.com with ESMTPSA id y126sm1932713wmg.19.2017.02.17.06.44.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Feb 2017 06:44:23 -0800 (PST) From: Nikolay Borisov X-Google-Original-From: Nikolay Borisov To: dsterba@suse.com Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCH 38/38] btrfs: Make btrfs_del_delalloc_inode take btrfs_inode Date: Fri, 17 Feb 2017 16:43:29 +0200 Message-Id: <1487342609-20652-39-git-send-email-nborisov@suse.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1487342609-20652-1-git-send-email-nborisov@suse.com> References: <1487342609-20652-1-git-send-email-nborisov@suse.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/inode.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index d78ec8d78781..d83ec55f00d5 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -1635,15 +1635,15 @@ static void btrfs_add_delalloc_inodes(struct btrfs_root *root, } static void btrfs_del_delalloc_inode(struct btrfs_root *root, - struct inode *inode) + 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); spin_lock(&root->delalloc_lock); - if (!list_empty(&BTRFS_I(inode)->delalloc_inodes)) { - list_del_init(&BTRFS_I(inode)->delalloc_inodes); + if (!list_empty(&inode->delalloc_inodes)) { + list_del_init(&inode->delalloc_inodes); clear_bit(BTRFS_INODE_IN_DELALLOC_LIST, - &BTRFS_I(inode)->runtime_flags); + &inode->runtime_flags); root->nr_delalloc_inodes--; if (!root->nr_delalloc_inodes) { spin_lock(&fs_info->delalloc_root_lock); @@ -1762,7 +1762,7 @@ static void btrfs_clear_bit_hook(struct btrfs_inode *inode, inode->delalloc_bytes -= len; if (do_list && inode->delalloc_bytes == 0 && test_bit(BTRFS_INODE_IN_DELALLOC_LIST, &inode->runtime_flags)) - btrfs_del_delalloc_inode(root, &inode->vfs_inode); + btrfs_del_delalloc_inode(root, inode); spin_unlock(&inode->lock); } }