summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYan Zheng <zheng.yan@oracle.com>2009-07-22 09:59:00 -0400
committerChris Mason <chris.mason@oracle.com>2009-07-22 09:59:00 -0400
commitbf1fb512a58d7aeb41aaa40d6d2d2d29e08e506a (patch)
tree7a4dca58c7a39cbe12e0931353fa66586f240075
parent1bec1aed1e7e632b3cc43b6807c2b4dcd1572e28 (diff)
downloadblackbird-op-linux-bf1fb512a58d7aeb41aaa40d6d2d2d29e08e506a.tar.gz
blackbird-op-linux-bf1fb512a58d7aeb41aaa40d6d2d2d29e08e506a.zip
Btrfs: properly update space information after shrinking device.
Change 'goto done' to 'break' for the case of all device extents have been freed, so that the code updates space information will be execute. Signed-off-by: Yan Zheng <zheng.yan@oracle.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r--fs/btrfs/volumes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 3ab80e9cd767..f057730a72bb 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2007,7 +2007,7 @@ int btrfs_shrink_device(struct btrfs_device *device, u64 new_size)
goto done;
if (ret) {
ret = 0;
- goto done;
+ break;
}
l = path->nodes[0];
@@ -2015,7 +2015,7 @@ int btrfs_shrink_device(struct btrfs_device *device, u64 new_size)
btrfs_item_key_to_cpu(l, &key, path->slots[0]);
if (key.objectid != device->devid)
- goto done;
+ break;
dev_extent = btrfs_item_ptr(l, slot, struct btrfs_dev_extent);
length = btrfs_dev_extent_length(l, dev_extent);
OpenPOWER on IntegriCloud