Btrfs: fix double free in find_lock_delalloc_range
authorChris Mason <clm@fb.com>
Wed, 21 May 2014 12:49:54 +0000 (05:49 -0700)
committerJiri Slaby <jslaby@suse.cz>
Wed, 2 Jul 2014 10:06:35 +0000 (12:06 +0200)
commit7855e3447a166f5a24d2b95dc2633f7fb9eb6cc9
treeb6019af981d1742b35f2375f31f1242f73628bce
parent9335d6f8b8f53fa6da1cc64b8effe2388d4254dd
Btrfs: fix double free in find_lock_delalloc_range

commit 7d78874273463a784759916fc3e0b4e2eb141c70 upstream.

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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
fs/btrfs/extent_io.c