Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262231
b: refs/heads/master
c: a0f98dd
h: refs/heads/master
i:
  262229: 0ea6488
  262227: 6ca1717
  262223: 6c2068a
v: v3
  • Loading branch information
Wanlong Gao authored and Chris Mason committed Aug 1, 2011
1 parent 2830eb3 commit ba84089
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 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: b43b31bdf2e662006c27cc4dcccf863312d62bc1
refs/heads/master: a0f98dde11a1afe9fbf5c98f57968e086e98b6f5
11 changes: 5 additions & 6 deletions trunk/fs/btrfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ struct inode_defrag {
* If an existing record is found the defrag item you
* pass in is freed
*/
static int __btrfs_add_inode_defrag(struct inode *inode,
static void __btrfs_add_inode_defrag(struct inode *inode,
struct inode_defrag *defrag)
{
struct btrfs_root *root = BTRFS_I(inode)->root;
Expand Down Expand Up @@ -106,11 +106,11 @@ static int __btrfs_add_inode_defrag(struct inode *inode,
BTRFS_I(inode)->in_defrag = 1;
rb_link_node(&defrag->rb_node, parent, p);
rb_insert_color(&defrag->rb_node, &root->fs_info->defrag_inodes);
return 0;
return;

exists:
kfree(defrag);
return 0;
return;

}

Expand All @@ -123,7 +123,6 @@ int btrfs_add_inode_defrag(struct btrfs_trans_handle *trans,
{
struct btrfs_root *root = BTRFS_I(inode)->root;
struct inode_defrag *defrag;
int ret = 0;
u64 transid;

if (!btrfs_test_opt(root, AUTO_DEFRAG))
Expand All @@ -150,9 +149,9 @@ int btrfs_add_inode_defrag(struct btrfs_trans_handle *trans,

spin_lock(&root->fs_info->defrag_inodes_lock);
if (!BTRFS_I(inode)->in_defrag)
ret = __btrfs_add_inode_defrag(inode, defrag);
__btrfs_add_inode_defrag(inode, defrag);
spin_unlock(&root->fs_info->defrag_inodes_lock);
return ret;
return 0;
}

/*
Expand Down

0 comments on commit ba84089

Please sign in to comment.