diff options
author | Nikolay Borisov <nborisov@suse.com> | 2017-08-17 10:52:28 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-08-18 17:36:29 +0300 |
commit | 92ac58ec99db0a9ad7337ce85f0ad98a90b88805 (patch) | |
tree | 8c27882fc288ff47665de7f4c09714b7892794b2 /fs/btrfs | |
parent | dc2f29212a2648164b054016dc5b948bf0fc92d5 (diff) | |
download | linux-92ac58ec99db0a9ad7337ce85f0ad98a90b88805.tar.xz |
btrfs: Remove never-reached WARN_ON
We have a WARN_ON(!var) inside an if branch which is executed (among
others) only when var is true.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-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 c74d24c1bbc9..eff674bfd162 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -6745,7 +6745,7 @@ static int unpin_extent_range(struct btrfs_fs_info *fs_info, if (!readonly && return_free_space && global_rsv->space_info == space_info) { u64 to_add = len; - WARN_ON(!return_free_space); + spin_lock(&global_rsv->lock); if (!global_rsv->full) { to_add = min(len, global_rsv->size - |