Skip to content

Commit

Permalink
Btrfs: return -ENOMEM in clear_extent_bit
Browse files Browse the repository at this point in the history
The btrfs releasepage function depends on ENOMEM coming
back when it is called atomic.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Chris Mason committed May 26, 2011
1 parent 4cb5300 commit c309df0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,8 @@ int clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
again:
if (!prealloc && (mask & __GFP_WAIT)) {
prealloc = alloc_extent_state(mask);
BUG_ON(!prealloc);
if (!prealloc)
return -ENOMEM;
}

spin_lock(&tree->lock);
Expand Down

0 comments on commit c309df0

Please sign in to comment.