diff options
| -rw-r--r-- | fs/btrfs/qgroup.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index f011d9b8ffb1..69fa487e29ce 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c | |||
| @@ -620,7 +620,9 @@ static int update_qgroup_limit_item(struct btrfs_trans_handle *trans, | |||
| 620 | key.offset = qgroupid; | 620 | key.offset = qgroupid; |
| 621 | 621 | ||
| 622 | path = btrfs_alloc_path(); | 622 | path = btrfs_alloc_path(); |
| 623 | BUG_ON(!path); | 623 | if (!path) |
| 624 | return -ENOMEM; | ||
| 625 | |||
| 624 | ret = btrfs_search_slot(trans, root, &key, path, 0, 1); | 626 | ret = btrfs_search_slot(trans, root, &key, path, 0, 1); |
| 625 | if (ret > 0) | 627 | if (ret > 0) |
| 626 | ret = -ENOENT; | 628 | ret = -ENOENT; |
| @@ -661,7 +663,9 @@ static int update_qgroup_info_item(struct btrfs_trans_handle *trans, | |||
| 661 | key.offset = qgroup->qgroupid; | 663 | key.offset = qgroup->qgroupid; |
| 662 | 664 | ||
| 663 | path = btrfs_alloc_path(); | 665 | path = btrfs_alloc_path(); |
| 664 | BUG_ON(!path); | 666 | if (!path) |
| 667 | return -ENOMEM; | ||
| 668 | |||
| 665 | ret = btrfs_search_slot(trans, root, &key, path, 0, 1); | 669 | ret = btrfs_search_slot(trans, root, &key, path, 0, 1); |
| 666 | if (ret > 0) | 670 | if (ret > 0) |
| 667 | ret = -ENOENT; | 671 | ret = -ENOENT; |
| @@ -702,7 +706,9 @@ static int update_qgroup_status_item(struct btrfs_trans_handle *trans, | |||
| 702 | key.offset = 0; | 706 | key.offset = 0; |
| 703 | 707 | ||
| 704 | path = btrfs_alloc_path(); | 708 | path = btrfs_alloc_path(); |
| 705 | BUG_ON(!path); | 709 | if (!path) |
| 710 | return -ENOMEM; | ||
| 711 | |||
| 706 | ret = btrfs_search_slot(trans, root, &key, path, 0, 1); | 712 | ret = btrfs_search_slot(trans, root, &key, path, 0, 1); |
| 707 | if (ret > 0) | 713 | if (ret > 0) |
| 708 | ret = -ENOENT; | 714 | ret = -ENOENT; |
