summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-02-15 08:00:35 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-02-15 08:00:35 -0800
commit007a14af2649c9ac77f38cd23469518ffb8b355a (patch)
treed6bc4477c11d7c8fd892f059acf0fc1ed547ba52 /fs/btrfs/disk-io.c
parent261cd298a8c363d7985e3482946edb4bfedacf98 (diff)
parentc26a920373a983b52223eed5a13b97404d8b4158 (diff)
downloadlinux-stable-007a14af2649c9ac77f38cd23469518ffb8b355a.tar.gz
linux-stable-007a14af2649c9ac77f38cd23469518ffb8b355a.tar.bz2
linux-stable-007a14af2649c9ac77f38cd23469518ffb8b355a.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: Btrfs: check return value of alloc_extent_map() Btrfs - Fix memory leak in btrfs_init_new_device() btrfs: prevent heap corruption in btrfs_ioctl_space_info() Btrfs: Fix balance panic Btrfs: don't release pages when we can't clear the uptodate bits Btrfs: fix page->private races
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index fdce8799b98d..e1aa8d607bc7 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -359,10 +359,14 @@ static int csum_dirty_buffer(struct btrfs_root *root, struct page *page)
tree = &BTRFS_I(page->mapping->host)->io_tree;
- if (page->private == EXTENT_PAGE_PRIVATE)
+ if (page->private == EXTENT_PAGE_PRIVATE) {
+ WARN_ON(1);
goto out;
- if (!page->private)
+ }
+ if (!page->private) {
+ WARN_ON(1);
goto out;
+ }
len = page->private >> 2;
WARN_ON(len == 0);