Skip to content

Commit

Permalink
Btrfs: make BUG_ON() in add_pinned_bytes() an ASSERT()
Browse files Browse the repository at this point in the history
The value of flags is one of DATA/METADATA/SYSTEM, they must exist at
when add_pinned_bytes is called.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Tested-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ added changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Omar Sandoval authored and David Sterba committed Jun 29, 2017
1 parent 0d9f824 commit 55e8196
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ static void add_pinned_bytes(struct btrfs_fs_info *fs_info, s64 num_bytes,
}

space_info = __find_space_info(fs_info, flags);
BUG_ON(!space_info); /* Logic bug */
ASSERT(space_info);
percpu_counter_add(&space_info->total_bytes_pinned, num_bytes);
}

Expand Down

0 comments on commit 55e8196

Please sign in to comment.