projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1dd4602
)
btrfs: Remove BUG_ON from __finish_chunk_alloc()
author
Mark Fasheh
<mfasheh@suse.de>
Fri, 9 Sep 2011 00:40:01 +0000
(17:40 -0700)
committer
David Sterba
<dsterba@suse.cz>
Thu, 22 Mar 2012 00:45:39 +0000
(
01:45
+0100)
btrfs_alloc_chunk() unconditionally BUGs on any error returned from
__finish_chunk_alloc() so there's no need for two BUG_ON lines. Remove the
one from __finish_chunk_alloc().
Signed-off-by: Mark Fasheh <mfasheh@suse.de>
fs/btrfs/volumes.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/volumes.c
b/fs/btrfs/volumes.c
index f002973959d0053a8f1e8b441e43419b43dc558c..394bf15ea18c938f4840f53c4b5d0228bb1470c1 100644
(file)
--- a/
fs/btrfs/volumes.c
+++ b/
fs/btrfs/volumes.c
@@
-3383,7
+3383,8
@@
static int __finish_chunk_alloc(struct btrfs_trans_handle *trans,
device = map->stripes[index].dev;
device->bytes_used += stripe_size;
ret = btrfs_update_device(trans, device);
- BUG_ON(ret);
+ if (ret)
+ goto out_free;
index++;
}
@@
-3430,6
+3431,7
@@
static int __finish_chunk_alloc(struct btrfs_trans_handle *trans,
item_size);
}
+out_free:
kfree(chunk);
return ret;
}