projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
047e5e1
)
btrfs: handle allocation error in update_dev_stat_item
author
David Sterba
<dsterba@suse.com>
Wed, 15 Feb 2017 08:35:01 +0000
(09:35 +0100)
committer
David Sterba
<dsterba@suse.com>
Tue, 28 Feb 2017 13:27:11 +0000
(14:27 +0100)
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/volumes.c
b/fs/btrfs/volumes.c
index b443cc71830f8585f362b102cc390205e41312cf..7c8c7bbee197514cb92b2bed02939df9ae124aba 100644
(file)
--- a/
fs/btrfs/volumes.c
+++ b/
fs/btrfs/volumes.c
@@
-6956,7
+6956,8
@@
static int update_dev_stat_item(struct btrfs_trans_handle *trans,
key.offset = device->devid;
path = btrfs_alloc_path();
- BUG_ON(!path);
+ if (!path)
+ return -ENOMEM;
ret = btrfs_search_slot(trans, dev_root, &key, path, -1, 1);
if (ret < 0) {
btrfs_warn_in_rcu(fs_info,