btrfs-progs: Do not free dirty extent buffer

free_some_buffer() should not free dirty extent buffers. They are left
to be committed.

Signed-off-by: Naohiro Aota <naota@elisp.net>
Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
Naohiro Aota 2014-08-25 14:09:07 +09:00 committed by David Sterba
parent ea7c181c68
commit 15cda713b2
1 changed files with 1 additions and 1 deletions

View File

@ -552,7 +552,7 @@ static int free_some_buffers(struct extent_io_tree *tree)
list_for_each_safe(node, next, &tree->lru) {
eb = list_entry(node, struct extent_buffer, lru);
if (eb->refs == 1) {
if (eb->refs == 1 && !(eb->flags & EXTENT_DIRTY)) {
free_extent_buffer(eb);
if (tree->cache_size < cache_hard_max)
break;