diff options
author | Omar Sandoval <osandov@fb.com> | 2017-06-07 01:45:27 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-06-29 20:17:01 +0200 |
commit | 55e8196a57cfe603ce3480a66c15dde3a13fe218 (patch) | |
tree | 3b49f0e2d0023e47743c87244cff630c0dfe0e3c /fs/btrfs/extent-tree.c | |
parent | Btrfs: make add_pinned_bytes() take an s64 num_bytes instead of u64 (diff) | |
download | linux-55e8196a57cfe603ce3480a66c15dde3a13fe218.tar.xz linux-55e8196a57cfe603ce3480a66c15dde3a13fe218.zip |
Btrfs: make BUG_ON() in add_pinned_bytes() an ASSERT()
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>
Diffstat (limited to '')
-rw-r--r-- | fs/btrfs/extent-tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index d784ecef27c0..b344966585c8 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -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); } |