diff options
author | Chris Mason <clm@fb.com> | 2014-05-21 05:49:54 -0700 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-06-09 17:20:52 -0700 |
commit | 7d78874273463a784759916fc3e0b4e2eb141c70 (patch) | |
tree | 5f20c29c1b153118d7d26fb7e8928e3821593c44 /fs | |
parent | 58dfae6365666e26cb2d172dc437773120fc4e1a (diff) |
Btrfs: fix double free in find_lock_delalloc_range
We need to NULL the cached_state after freeing it, otherwise
we might free it again if find_delalloc_range doesn't find anything.
Signed-off-by: Chris Mason <clm@fb.com>
cc: stable@vger.kernel.org
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/extent_io.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 8285ed0464f..0f425dea452 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -1693,6 +1693,7 @@ again: * shortening the size of the delalloc range we're searching */ free_extent_state(cached_state); + cached_state = NULL; if (!loops) { max_bytes = PAGE_CACHE_SIZE; loops = 1; |