Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349154
b: refs/heads/master
c: cfa7a9c
h: refs/heads/master
v: v3
  • Loading branch information
Tsutomu Itoh authored and Josef Bacik committed Jan 14, 2013
1 parent d4832c1 commit 8d0bb62
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2cf687039676c2b6e1ee96b0b89090aca94babcd
refs/heads/master: cfa7a9ccda711ac6ab8f0d17c3a9b540092d305a
20 changes: 1 addition & 19 deletions trunk/fs/btrfs/qgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,13 +379,6 @@ int btrfs_read_qgroup_config(struct btrfs_fs_info *fs_info)

ret = add_relation_rb(fs_info, found_key.objectid,
found_key.offset);
if (ret == -ENOENT) {
printk(KERN_WARNING
"btrfs: orphan qgroup relation 0x%llx->0x%llx\n",
(unsigned long long)found_key.objectid,
(unsigned long long)found_key.offset);
ret = 0; /* ignore the error */
}
if (ret)
goto out;
next2:
Expand Down Expand Up @@ -963,28 +956,17 @@ int btrfs_remove_qgroup(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info, u64 qgroupid)
{
struct btrfs_root *quota_root;
struct btrfs_qgroup *qgroup;
int ret = 0;

quota_root = fs_info->quota_root;
if (!quota_root)
return -EINVAL;

/* check if there are no relations to this qgroup */
spin_lock(&fs_info->qgroup_lock);
qgroup = find_qgroup_rb(fs_info, qgroupid);
if (qgroup) {
if (!list_empty(&qgroup->groups) || !list_empty(&qgroup->members)) {
spin_unlock(&fs_info->qgroup_lock);
return -EBUSY;
}
}
spin_unlock(&fs_info->qgroup_lock);

ret = del_qgroup_item(trans, quota_root, qgroupid);

spin_lock(&fs_info->qgroup_lock);
del_qgroup_rb(quota_root->fs_info, qgroupid);

spin_unlock(&fs_info->qgroup_lock);

return ret;
Expand Down
4 changes: 3 additions & 1 deletion trunk/fs/btrfs/send.c
Original file line number Diff line number Diff line change
Expand Up @@ -1814,8 +1814,10 @@ static int name_cache_insert(struct send_ctx *sctx,
(unsigned long)nce->ino);
if (!nce_head) {
nce_head = kmalloc(sizeof(*nce_head), GFP_NOFS);
if (!nce_head)
if (!nce_head) {
kfree(nce);
return -ENOMEM;
}
INIT_LIST_HEAD(nce_head);

ret = radix_tree_insert(&sctx->name_cache, nce->ino, nce_head);
Expand Down

0 comments on commit 8d0bb62

Please sign in to comment.