aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-06 13:20:07 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-06 13:20:07 -0400
commit271fd5d7286eb931142402c170943d14640bb922 (patch)
treedc60c1623f63a7db588de4c3c7362a9ac7abf56a /fs/btrfs/extent_io.c
parentce7e5d2d19bc371e1b67826bfbc79bbcbaa9772f (diff)
parentb9fab919b748c7b39c19ff236ed6c5682c266dde (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes from Chris Mason: "The big ones here are a memory leak we introduced in rc1, and a scheduling while atomic if the transid on disk doesn't match the transid we expected. This happens for corrupt blocks, or out of date disks. It also fixes up the ioctl definition for our ioctl to resolve logical inode numbers. The __u32 was a merging error and doesn't match what we ship in the progs." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: avoid sleeping in verify_parent_transid while atomic Btrfs: fix crash in scrub repair code when device is missing btrfs: Fix mismatching struct members in ioctl.h Btrfs: fix page leak when allocing extent buffers Btrfs: Add properly locking around add_root_to_dirty_list
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 198c2ba2fa40..c9018a05036e 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}