summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel J Blueman <daniel@quora.org>2012-04-27 18:41:46 +0200
committerChris Mason <chris.mason@oracle.com>2012-04-27 19:55:14 +0200
commit7654b72417e10e294563496e25211200f9b8b6d3 (patch)
tree5ca24ea9bb735133c0e09a789d3eb50d9a8b69b4
parentBtrfs: fix block_rsv and space_info lock ordering (diff)
downloadlinux-7654b72417e10e294563496e25211200f9b8b6d3.tar.xz
linux-7654b72417e10e294563496e25211200f9b8b6d3.zip
Btrfs: Fix space checking during fs resize
Fix out-of-space checking, addressing a warning and potential resource leak when resizing the filesystem down while allocating blocks. Signed-off-by: Daniel J Blueman <daniel@quora.org> Reviewed-by: Josef Bacik <josef@redhat.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r--fs/btrfs/relocation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 5a105a086acf..646ee21bb035 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -3813,7 +3813,7 @@ restart:
ret = btrfs_block_rsv_check(rc->extent_root, rc->block_rsv, 5);
if (ret < 0) {
- if (ret != -EAGAIN) {
+ if (ret != -ENOSPC) {
err = ret;
WARN_ON(1);
break;