OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4cb5300
)
Btrfs: return -ENOMEM in clear_extent_bit
author
Chris Mason
<chris.mason@oracle.com>
Thu, 26 May 2011 21:43:59 +0000
(17:43 -0400)
committer
Chris Mason
<chris.mason@oracle.com>
Thu, 26 May 2011 21:52:44 +0000
(17:52 -0400)
The btrfs releasepage function depends on ENOMEM coming
back when it is called atomic.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/extent_io.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/extent_io.c
b/fs/btrfs/extent_io.c
index
a90c4a1
..
0e0fe0f
100644
(file)
--- 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,
again:
if (!prealloc && (mask & __GFP_WAIT)) {
prealloc = alloc_extent_state(mask);
- BUG_ON(!prealloc);
+ if (!prealloc)
+ return -ENOMEM;
}
spin_lock(&tree->lock);