From: Liu Bo <bo.li.liu@oracle.com>
To: Jeff Mahoney <jeffm@suse.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>,
Nikolay Borisov <nborisov@suse.com>
Subject: Re: [PATCH] btrfs: btrfs_evict_inode must clear all inodes
Date: Mon, 29 Jan 2018 11:58:06 -0800 [thread overview]
Message-ID: <20180129195806.GA6535@dhcp-10-159-251-27.vpn.oracle.com> (raw)
In-Reply-To: <c38b2527-899f-9be2-87e5-6b4048e17217@suse.com>
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@suse.com>
> Cc: <stable@vger.kernel.org> # v4.8+
> Signed-off-by: Jeff Mahoney <jeffm@suse.com>
> ---
> 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
next prev parent reply other threads:[~2018-01-29 19:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-29 16:46 [PATCH] btrfs: btrfs_evict_inode must clear all inodes Jeff Mahoney
2018-01-29 16:48 ` Nikolay Borisov
2018-01-29 19:58 ` Liu Bo [this message]
2018-01-29 20:03 ` Jeff Mahoney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180129195806.GA6535@dhcp-10-159-251-27.vpn.oracle.com \
--to=bo.li.liu@oracle.com \
--cc=jeffm@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).