From: Daniel J Blueman Date: Fri, 27 Apr 2012 16:41:46 +0000 (-0400) Subject: Btrfs: Fix space checking during fs resize X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=7654b72417e10e294563496e25211200f9b8b6d3;p=~shefty%2Frdma-dev.git 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 Reviewed-by: Josef Bacik Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 5a105a086ac..646ee21bb03 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;