From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from userp2120.oracle.com ([156.151.31.85]:57120 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751604AbeA2T6N (ORCPT ); Mon, 29 Jan 2018 14:58:13 -0500 Date: Mon, 29 Jan 2018 11:58:06 -0800 From: Liu Bo To: Jeff Mahoney Cc: linux-btrfs , Nikolay Borisov Subject: Re: [PATCH] btrfs: btrfs_evict_inode must clear all inodes Message-ID: <20180129195806.GA6535@dhcp-10-159-251-27.vpn.oracle.com> Reply-To: bo.li.liu@oracle.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Sender: linux-btrfs-owner@vger.kernel.org List-ID: On Mon, Jan 29, 2018 at 11:46:28AM -0500, 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 > --- > 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)); I had a patch for this, and also kmem_cache_free() is not supposed to be called here, but in ->destroy_inode(). Thanks, -liubo > return; > } > > -- > Jeff Mahoney > SUSE Labs > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html