Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285973
b: refs/heads/master
c: de32226
h: refs/heads/master
i:
  285971: b1c3923
v: v3
  • Loading branch information
Ilya Dryomov committed Jan 16, 2012
1 parent fcc6992 commit f0003f6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a7e99c691af553fc15ac46a51f130b7c59a65f76
refs/heads/master: de322263d3a6d4ffd4ed7c4d0c6536e9497aec9b
15 changes: 15 additions & 0 deletions trunk/fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3106,6 +3106,20 @@ static long btrfs_ioctl_balance(struct btrfs_root *root, void __user *arg)
ret = PTR_ERR(bargs);
goto out;
}

if (bargs->flags & BTRFS_BALANCE_RESUME) {
if (!fs_info->balance_ctl) {
ret = -ENOTCONN;
goto out_bargs;
}

bctl = fs_info->balance_ctl;
spin_lock(&fs_info->balance_lock);
bctl->flags |= BTRFS_BALANCE_RESUME;
spin_unlock(&fs_info->balance_lock);

goto do_balance;
}
} else {
bargs = NULL;
}
Expand Down Expand Up @@ -3133,6 +3147,7 @@ static long btrfs_ioctl_balance(struct btrfs_root *root, void __user *arg)
bctl->flags |= BTRFS_BALANCE_TYPE_MASK;
}

do_balance:
ret = btrfs_balance(bctl, bargs);
/*
* bctl is freed in __cancel_balance or in free_fs_info if
Expand Down

0 comments on commit f0003f6

Please sign in to comment.