On Tue, Jun 06, 2017 at 04:45:32PM -0700, Omar Sandoval wrote:
> From: Omar Sandoval <osandov@xxxxxx>
>
> Catch any future/remaining leaks or underflows of total_bytes_pinned.
>
This might be a little bit late, what about checking it after
btrfs_finish_extetn_commit()?
-liubo
> Signed-off-by: Omar Sandoval <osandov@xxxxxx>
> ---
> fs/btrfs/extent-tree.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
> index 75ad24f8d253..5fb2fb27eda6 100644
> --- a/fs/btrfs/extent-tree.c
> +++ b/fs/btrfs/extent-tree.c
> @@ -9860,6 +9860,7 @@ int btrfs_free_block_groups(struct btrfs_fs_info *info)
> space_info->bytes_reserved > 0 ||
> space_info->bytes_may_use > 0))
> dump_space_info(info, space_info, 0, 0);
> + WARN_ON(percpu_counter_sum(&space_info->total_bytes_pinned) != 0);
> list_del(&space_info->list);
> for (i = 0; i < BTRFS_NR_RAID_TYPES; i++) {
> struct kobject *kobj;
> --
> 2.13.0
>
--
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