Commit bf1fb512a58d7aeb41aaa40d6d2d2d29e08e506a

Authored by Yan Zheng
Committed by Chris Mason
1 parent 1bec1aed1e

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>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

... ... @@ -2007,7 +2007,7 @@
2007 2007 goto done;
2008 2008 if (ret) {
2009 2009 ret = 0;
2010   - goto done;
  2010 + break;
2011 2011 }
2012 2012  
2013 2013 l = path->nodes[0];
... ... @@ -2015,7 +2015,7 @@
2015 2015 btrfs_item_key_to_cpu(l, &key, path->slots[0]);
2016 2016  
2017 2017 if (key.objectid != device->devid)
2018   - goto done;
  2018 + break;
2019 2019  
2020 2020 dev_extent = btrfs_item_ptr(l, slot, struct btrfs_dev_extent);
2021 2021 length = btrfs_dev_extent_length(l, dev_extent);