ctree.c (751a27615ddaaf95519565d83bac65b8aafab9e8) | ctree.c (7569141e8fa855b509e674456132b83bca5f087c) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2007,2008 Oracle. All rights reserved. 4 */ 5 6#include <linux/sched.h> 7#include <linux/slab.h> 8#include <linux/rbtree.h> --- 3986 unchanged lines hidden (view full) --- 3995 int orig_slot, slot; 3996 char *buf; 3997 u32 nritems; 3998 u32 item_size; 3999 u32 orig_offset; 4000 struct btrfs_disk_key disk_key; 4001 4002 leaf = path->nodes[0]; | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2007,2008 Oracle. All rights reserved. 4 */ 5 6#include <linux/sched.h> 7#include <linux/slab.h> 8#include <linux/rbtree.h> --- 3986 unchanged lines hidden (view full) --- 3995 int orig_slot, slot; 3996 char *buf; 3997 u32 nritems; 3998 u32 item_size; 3999 u32 orig_offset; 4000 struct btrfs_disk_key disk_key; 4001 4002 leaf = path->nodes[0]; |
4003 BUG_ON(btrfs_leaf_free_space(leaf) < sizeof(struct btrfs_item)); | 4003 /* 4004 * Shouldn't happen because the caller must have previously called 4005 * setup_leaf_for_split() to make room for the new item in the leaf. 4006 */ 4007 if (WARN_ON(btrfs_leaf_free_space(leaf) < sizeof(struct btrfs_item))) 4008 return -ENOSPC; |
4004 4005 orig_slot = path->slots[0]; 4006 orig_offset = btrfs_item_offset(leaf, path->slots[0]); 4007 item_size = btrfs_item_size(leaf, path->slots[0]); 4008 4009 buf = kmalloc(item_size, GFP_NOFS); 4010 if (!buf) 4011 return -ENOMEM; --- 1162 unchanged lines hidden --- | 4009 4010 orig_slot = path->slots[0]; 4011 orig_offset = btrfs_item_offset(leaf, path->slots[0]); 4012 item_size = btrfs_item_size(leaf, path->slots[0]); 4013 4014 buf = kmalloc(item_size, GFP_NOFS); 4015 if (!buf) 4016 return -ENOMEM; --- 1162 unchanged lines hidden --- |