Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa252992 authored by David Sterba's avatar David Sterba
Browse files

btrfs: handle allocation error in update_dev_stat_item



Reviewed-by: default avatarLiu Bo <bo.li.liu@oracle.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 047e5e17
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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,