Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128317
b: refs/heads/master
c: 30ae846
h: refs/heads/master
i:
  128315: 253df46
v: v3
  • Loading branch information
Chris Mason authored and David Woodhouse committed Mar 29, 2007
1 parent 5f532b4 commit 536514b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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: 87cbda5c1f54aba67b1e318a4a4824c9e9f16324
refs/heads/master: 30ae8467483d7ab023b5e728bf7d74a575c78023
7 changes: 4 additions & 3 deletions trunk/fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ struct buffer_head *btrfs_find_create_tree_block(struct btrfs_root *root,
if (!page)
return NULL;

wait_on_page_writeback(page);
if (!page_has_buffers(page))
create_empty_buffers(page, root->fs_info->sb->s_blocksize, 0);
head = page_buffers(page);
Expand Down Expand Up @@ -300,11 +299,12 @@ struct btrfs_root *open_ctree(struct super_block *sb,
fs_info->btree_inode->i_mapping->a_ops = &btree_aops;
mapping_set_gfp_mask(fs_info->btree_inode->i_mapping, GFP_NOFS);
fs_info->hash_tfm = crypto_alloc_hash("sha256", 0, CRYPTO_ALG_ASYNC);
if (!fs_info->hash_tfm) {
spin_lock_init(&fs_info->hash_lock);

if (!fs_info->hash_tfm || IS_ERR(fs_info->hash_tfm)) {
printk("failed to allocate sha256 hash\n");
return NULL;
}
spin_lock_init(&fs_info->hash_lock);

mutex_init(&fs_info->trans_mutex);
mutex_init(&fs_info->fs_mutex);
Expand Down Expand Up @@ -394,6 +394,7 @@ int close_ctree(struct btrfs_root *root)
btrfs_block_release(root, root->commit_root);
btrfs_block_release(root, root->fs_info->sb_buffer);
crypto_free_hash(root->fs_info->hash_tfm);
truncate_inode_pages(root->fs_info->btree_inode->i_mapping, 0);
iput(root->fs_info->btree_inode);
kfree(root->fs_info->extent_root);
kfree(root->fs_info->inode_root);
Expand Down

0 comments on commit 536514b

Please sign in to comment.