linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Liu Bo <bo.li.liu@oracle.com>
To: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: fix a warning when iput a file
Date: Sat, 14 Dec 2013 21:49:36 +0800	[thread overview]
Message-ID: <20131214134935.GA23060@localhost.localdomain> (raw)
In-Reply-To: <1387006051-17067-1-git-send-email-wangsl.fnst@cn.fujitsu.com>

On Sat, Dec 14, 2013 at 03:27:31PM +0800, Wang Shilong wrote:
> See the warning below:
> 
> [ 1209.102076]  [<ffffffffa04721b9>] remove_extent_mapping+0x69/0x70 [btrfs]
> [ 1209.102084]  [<ffffffffa0466b06>] btrfs_evict_inode+0x96/0x4d0 [btrfs]
> [ 1209.102089]  [<ffffffff81073010>] ? wake_atomic_t_function+0x40/0x40
> [ 1209.102092]  [<ffffffff8118ab2e>] evict+0x9e/0x190
> [ 1209.102094]  [<ffffffff8118b313>] iput+0xf3/0x180
> [ 1209.102101]  [<ffffffffa0461fd1>] btrfs_run_delayed_iputs+0xb1/0xd0 [btrfs]
> [ 1209.102107]  [<ffffffffa045d358>] __btrfs_end_transaction+0x268/0x350 [btrfs]
> 
> clear extent bit here to avoid triggering WARN_ON() in remove_extent_mapping()

Why PINNED and LOGGING isn't unset as usual?

-liubo

> 
> Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
> ---
>  fs/btrfs/inode.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
> index e889779..c0f0f9d 100644
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@ -4515,6 +4515,8 @@ static void evict_inode_truncate_pages(struct inode *inode)
>  
>  		node = rb_first(&map_tree->map);
>  		em = rb_entry(node, struct extent_map, rb_node);
> +		clear_bit(EXTENT_FLAG_PINNED, &em->flags);
> +		clear_bit(EXTENT_FLAG_LOGGING, &em->flags);
>  		remove_extent_mapping(map_tree, em);
>  		free_extent_map(em);
>  	}
> -- 
> 1.8.3.1
> 
> --
> 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

  reply	other threads:[~2013-12-14 13:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-14  7:27 [PATCH] Btrfs: fix a warning when iput a file Wang Shilong
2013-12-14 13:49 ` Liu Bo [this message]
     [not found]   ` <CAP9B-QnExXqCPxXZxK2ghjfHvfi-pmy-CtKirJLu-vnGzY=+gg@mail.gmail.com>
2013-12-14 14:50     ` Fwd: " Shilong Wang
2013-12-14 14:54 ` Filipe David Manana

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=20131214134935.GA23060@localhost.localdomain \
    --to=bo.li.liu@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wangsl.fnst@cn.fujitsu.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).