diff options
author | Chris Mason <chris.mason@fusionio.com> | 2013-05-17 21:53:17 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-05-17 21:53:17 -0400 |
commit | c5cb6a0573bef87e098ee3cd946115ebe60a910e (patch) | |
tree | 49b64747b7af6b1024b25470cba583fa7dafe531 /fs/btrfs/inode.c | |
parent | 9be3395bcd4ad4af76476ac38152b4cafa6b6159 (diff) | |
parent | 655b09fe540b73edeaabfb4c2d700be51a1f8bce (diff) | |
download | blackbird-op-linux-c5cb6a0573bef87e098ee3cd946115ebe60a910e.tar.gz blackbird-op-linux-c5cb6a0573bef87e098ee3cd946115ebe60a910e.zip |
Merge branch 'for-chris' of git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index d59dddfb1f96..23c596cd1b98 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -714,8 +714,10 @@ retry: async_extent->ram_size - 1, 0); em = alloc_extent_map(); - if (!em) + if (!em) { + ret = -ENOMEM; goto out_free_reserve; + } em->start = async_extent->start; em->len = async_extent->ram_size; em->orig_start = em->start; @@ -922,8 +924,10 @@ static noinline int __cow_file_range(struct btrfs_trans_handle *trans, } em = alloc_extent_map(); - if (!em) + if (!em) { + ret = -ENOMEM; goto out_reserve; + } em->start = start; em->orig_start = em->start; ram_size = ins.offset; @@ -4723,6 +4727,7 @@ void btrfs_evict_inode(struct inode *inode) btrfs_end_transaction(trans, root); btrfs_btree_balance_dirty(root); no_delete: + btrfs_remove_delayed_node(inode); clear_inode(inode); return; } @@ -4838,14 +4843,13 @@ static void inode_tree_add(struct inode *inode) struct rb_node **p; struct rb_node *parent; u64 ino = btrfs_ino(inode); -again: - p = &root->inode_tree.rb_node; - parent = NULL; if (inode_unhashed(inode)) return; - +again: + parent = NULL; spin_lock(&root->inode_lock); + p = &root->inode_tree.rb_node; while (*p) { parent = *p; entry = rb_entry(parent, struct btrfs_inode, rb_node); @@ -8000,7 +8004,6 @@ void btrfs_destroy_inode(struct inode *inode) inode_tree_del(inode); btrfs_drop_extent_cache(inode, 0, (u64)-1, 0); free: - btrfs_remove_delayed_node(inode); call_rcu(&inode->i_rcu, btrfs_i_callback); } |