diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/extent_io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 0c23e57077c6..2fb52c26c677 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
@@ -4120,6 +4120,7 @@ struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree, | |||
4120 | if (atomic_inc_not_zero(&exists->refs)) { | 4120 | if (atomic_inc_not_zero(&exists->refs)) { |
4121 | spin_unlock(&mapping->private_lock); | 4121 | spin_unlock(&mapping->private_lock); |
4122 | unlock_page(p); | 4122 | unlock_page(p); |
4123 | page_cache_release(p); | ||
4123 | mark_extent_buffer_accessed(exists); | 4124 | mark_extent_buffer_accessed(exists); |
4124 | goto free_eb; | 4125 | goto free_eb; |
4125 | } | 4126 | } |
@@ -4199,8 +4200,7 @@ free_eb: | |||
4199 | unlock_page(eb->pages[i]); | 4200 | unlock_page(eb->pages[i]); |
4200 | } | 4201 | } |
4201 | 4202 | ||
4202 | if (!atomic_dec_and_test(&eb->refs)) | 4203 | WARN_ON(!atomic_dec_and_test(&eb->refs)); |
4203 | return exists; | ||
4204 | btrfs_release_extent_buffer(eb); | 4204 | btrfs_release_extent_buffer(eb); |
4205 | return exists; | 4205 | return exists; |
4206 | } | 4206 | } |