From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:57576 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751249AbeA2Qsu (ORCPT ); Mon, 29 Jan 2018 11:48:50 -0500 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id EF0DCAC8C for ; Mon, 29 Jan 2018 16:48:48 +0000 (UTC) Subject: Re: [PATCH] btrfs: btrfs_evict_inode must clear all inodes To: Jeff Mahoney , linux-btrfs References: From: Nikolay Borisov Message-ID: Date: Mon, 29 Jan 2018 18:48:47 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Sender: linux-btrfs-owner@vger.kernel.org List-ID: On 29.01.2018 18:46, Jeff Mahoney wrote: > btrfs_evict_inode must clear all inodes or we'll hit a BUG_ON in evict(). > > Fixes: 3d48d9810de (btrfs: Handle uninitialised inode eviction) > Cc: Nikolay Borisov > Cc: # v4.8+ > Signed-off-by: Jeff Mahoney Yep, this is a genuine bug, however Liu Bo already sent a fix for that: Btrfs: fix btrfs_evict_inode to handle abnormal inodes correctly > --- > fs/btrfs/inode.c | 1 + > 1 file changed, 1 insertion(+) > > --- a/fs/btrfs/inode.c > +++ b/fs/btrfs/inode.c > @@ -5282,6 +5282,7 @@ void btrfs_evict_inode(struct inode *ino > trace_btrfs_inode_evict(inode); > > if (!root) { > + clear_inode(inode); > kmem_cache_free(btrfs_inode_cachep, BTRFS_I(inode)); > return; > } >