diff options
author | Chris Mason <chris.mason@oracle.com> | 2011-05-26 17:43:59 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-05-26 17:52:44 -0400 |
commit | c309df07868baa8b05d2a70637096465746fdbb5 (patch) | |
tree | 7c1749127d16aa07a1f3a296097f5f314b2a6a42 /fs/btrfs/extent_io.c | |
parent | 4cb5300bc839b8a943eb19c9f27f25470e22d0ca (diff) |
Btrfs: return -ENOMEM in clear_extent_bit
The btrfs releasepage function depends on ENOMEM coming
back when it is called atomic.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index a90c4a12556b..0e0fe0f6ec75 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
@@ -485,7 +485,8 @@ int clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, | |||
485 | again: | 485 | again: |
486 | if (!prealloc && (mask & __GFP_WAIT)) { | 486 | if (!prealloc && (mask & __GFP_WAIT)) { |
487 | prealloc = alloc_extent_state(mask); | 487 | prealloc = alloc_extent_state(mask); |
488 | BUG_ON(!prealloc); | 488 | if (!prealloc) |
489 | return -ENOMEM; | ||
489 | } | 490 | } |
490 | 491 | ||
491 | spin_lock(&tree->lock); | 492 | spin_lock(&tree->lock); |