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 <nborisov@xxxxxxxx>
> Cc: <stable@xxxxxxxxxxxxxxx> # v4.8+
> Signed-off-by: Jeff Mahoney <jeffm@xxxxxxxx>
> ---
> 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@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html