aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Fleetwood <mike.fleetwood@googlemail.com>2011-11-18 18:55:01 +0000
committerDavid Sterba <dsterba@suse.cz>2011-11-30 18:46:04 +0100
commitece7d20e8be6730fbb29f4550de6b19b1a3a9387 (patch)
tree7c01770040d8dd86548610679ab629683ec94017
parentaa38a711a893accf5b5192f3d705a120deaa81e0 (diff)
downloadlinux-stericsson-ece7d20e8be6730fbb29f4550de6b19b1a3a9387.tar.gz
Btrfs: Don't error on resizing FS to same size
It seems overly harsh to fail a resize of a btrfs file system to the same size when a shrink or grow would succeed. User app GParted trips over this error. Allow it by bypassing the shrink or grow operation. Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
-rw-r--r--fs/btrfs/ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index a90e749ed6d2..72d461656f60 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1278,7 +1278,7 @@ static noinline int btrfs_ioctl_resize(struct btrfs_root *root,
}
ret = btrfs_grow_device(trans, device, new_size);
btrfs_commit_transaction(trans, root);
- } else {
+ } else if (new_size < old_size) {
ret = btrfs_shrink_device(device, new_size);
}