Commit 428e1b1
Revert "btrfs: add ASSERTs on prealloc in qgroup functions"
This reverts commit 252877a.
Commit 252877a ("btrfs: add ASSERTs on prealloc in qgroup
functions") tries to remove the kfree() on preallocated qgroup during
several call sites, but this cannot work as intended:
- btrfs_quota_enable()
- btrfs_create_qgroup()
If add_qgroup_item() failed, we go out_free_path() and at that time
prealloc is not yet utilized and will trigger the new ASSERT().
- btrfs_qgroup_inherit()
If qgroup_auto_inherit() failed, prealloc is not yet utilized and
will trigger the new ASSERT()
Reported-by: syzbot+b44d4a4885bc82af2a06@syzkaller.appspotmail.com
Link: https://lore.kernel.org/linux-btrfs/69369331.a70a0220.38f243.009e.GAE@google.com/
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent 5630f75 commit 428e1b1
1 file changed
Lines changed: 4 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1243 | 1243 | | |
1244 | 1244 | | |
1245 | 1245 | | |
1246 | | - | |
1247 | | - | |
1248 | | - | |
1249 | | - | |
1250 | | - | |
1251 | | - | |
1252 | | - | |
1253 | | - | |
| 1246 | + | |
1254 | 1247 | | |
1255 | 1248 | | |
1256 | 1249 | | |
| |||
1682 | 1675 | | |
1683 | 1676 | | |
1684 | 1677 | | |
1685 | | - | |
1686 | | - | |
1687 | | - | |
1688 | | - | |
1689 | | - | |
1690 | | - | |
| 1678 | + | |
1691 | 1679 | | |
1692 | 1680 | | |
1693 | 1681 | | |
| |||
3279 | 3267 | | |
3280 | 3268 | | |
3281 | 3269 | | |
3282 | | - | |
| 3270 | + | |
3283 | 3271 | | |
3284 | 3272 | | |
3285 | 3273 | | |
| |||
3520 | 3508 | | |
3521 | 3509 | | |
3522 | 3510 | | |
3523 | | - | |
3524 | | - | |
3525 | | - | |
3526 | | - | |
3527 | | - | |
3528 | | - | |
3529 | | - | |
3530 | | - | |
| 3511 | + | |
3531 | 3512 | | |
3532 | 3513 | | |
3533 | 3514 | | |
| |||
0 commit comments