summaryrefslogtreecommitdiff
path: root/extent_io.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@fusionio.com>2013-02-06 12:51:58 -0500
committerChris Mason <chris.mason@fusionio.com>2013-02-06 12:51:58 -0500
commit82ac34581e8fae6ef3f84758361c75f5b30c576d (patch)
treeb7bb32f9e4b4f5989cc148543bf2782abb0a1c93 /extent_io.c
parent7b1c567c84a6292c138db3bd1638e19e73e0e593 (diff)
parent2986545ccd655273658e0e4463a669bb1893ba68 (diff)
Merge branch 'cov-fixes-v1-integration-20130201' of http://git.zabbo.net/cgit/btrfs-progs into merged
Diffstat (limited to 'extent_io.c')
-rw-r--r--extent_io.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/extent_io.c b/extent_io.c
index 45fa6bf6..987452e1 100644
--- a/extent_io.c
+++ b/extent_io.c
@@ -300,9 +300,11 @@ int set_extent_bits(struct extent_io_tree *tree, u64 start,
u64 last_start;
u64 last_end;
again:
- prealloc = alloc_extent_state();
- if (!prealloc)
- return -ENOMEM;
+ if (!prealloc) {
+ prealloc = alloc_extent_state();
+ if (!prealloc)
+ return -ENOMEM;
+ }
/*
* this search will find the extents that end after