diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2013-04-09 15:57:27 +0200 | 
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2013-04-09 16:02:14 +0200 | 
| commit | 71f6424023cb9fa381efc7237ca05926b2b1ca9a (patch) | |
| tree | 6c3c4a2110d0ff3d73c4bacaddb23b9295663695 /fs/btrfs/disk-io.c | |
| parent | 9bc128e16bb82c046d6972171de572affc5c4cbf (diff) | |
| parent | e933a1a12a02f42e0013cda87bba37ccb59efc47 (diff) | |
| download | olio-linux-3.10-71f6424023cb9fa381efc7237ca05926b2b1ca9a.tar.xz olio-linux-3.10-71f6424023cb9fa381efc7237ca05926b2b1ca9a.zip  | |
Merge branch 'mxs/cleanup' into next/multiplatform
This is a dependency for mxs/multiplatform
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Conflicts:
	drivers/clocksource/Makefile
Diffstat (limited to 'fs/btrfs/disk-io.c')
| -rw-r--r-- | fs/btrfs/disk-io.c | 14 | 
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 7d84651e850..6d19a0a554a 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1291,6 +1291,7 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,  				      0, objectid, NULL, 0, 0, 0);  	if (IS_ERR(leaf)) {  		ret = PTR_ERR(leaf); +		leaf = NULL;  		goto fail;  	} @@ -1334,11 +1335,16 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,  	btrfs_tree_unlock(leaf); +	return root; +  fail: -	if (ret) -		return ERR_PTR(ret); +	if (leaf) { +		btrfs_tree_unlock(leaf); +		free_extent_buffer(leaf); +	} +	kfree(root); -	return root; +	return ERR_PTR(ret);  }  static struct btrfs_root *alloc_log_tree(struct btrfs_trans_handle *trans, @@ -3253,7 +3259,7 @@ void btrfs_free_fs_root(struct btrfs_fs_info *fs_info, struct btrfs_root *root)  	if (btrfs_root_refs(&root->root_item) == 0)  		synchronize_srcu(&fs_info->subvol_srcu); -	if (fs_info->fs_state & BTRFS_SUPER_FLAG_ERROR) { +	if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state)) {  		btrfs_free_log(NULL, root);  		btrfs_free_log_root_tree(NULL, fs_info);  	}  |