projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Btrfs: don't steal the reserved space from the global reserve if their space type...
[cascardo/linux.git]
/
fs
/
btrfs
/
extent-tree.c
diff --git
a/fs/btrfs/extent-tree.c
b/fs/btrfs/extent-tree.c
index
5e2c0bf
..
54e63b2
100644
(file)
--- a/
fs/btrfs/extent-tree.c
+++ b/
fs/btrfs/extent-tree.c
@@
-6681,9
+6681,11
@@
try_reserve:
return block_rsv;
/*
* If we couldn't reserve metadata bytes try and use some from
return block_rsv;
/*
* If we couldn't reserve metadata bytes try and use some from
- * the global reserve.
+ * the global reserve if its space type is the same as the global
+ * reservation.
*/
*/
- if (block_rsv->type != BTRFS_BLOCK_RSV_GLOBAL) {
+ if (block_rsv->type != BTRFS_BLOCK_RSV_GLOBAL &&
+ block_rsv->space_info == global_rsv->space_info) {
ret = block_rsv_use_bytes(global_rsv, blocksize);
if (!ret)
return global_rsv;
ret = block_rsv_use_bytes(global_rsv, blocksize);
if (!ret)
return global_rsv;