file-item.c (cc14600c1516f6c679cab1c503a34841d58050a6) | file-item.c (7e4a3f7ed5d54926ec671bbb13e171cfe179cc50) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2007 Oracle. All rights reserved. 4 */ 5 6#include <linux/bio.h> 7#include <linux/slab.h> 8#include <linux/pagemap.h> --- 875 unchanged lines hidden (view full) --- 884 goto insert; 885 } 886 } else { 887 int slot = path->slots[0] + 1; 888 /* we didn't find a csum item, insert one */ 889 nritems = btrfs_header_nritems(path->nodes[0]); 890 if (!nritems || (path->slots[0] >= nritems - 1)) { 891 ret = btrfs_next_leaf(root, path); | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2007 Oracle. All rights reserved. 4 */ 5 6#include <linux/bio.h> 7#include <linux/slab.h> 8#include <linux/pagemap.h> --- 875 unchanged lines hidden (view full) --- 884 goto insert; 885 } 886 } else { 887 int slot = path->slots[0] + 1; 888 /* we didn't find a csum item, insert one */ 889 nritems = btrfs_header_nritems(path->nodes[0]); 890 if (!nritems || (path->slots[0] >= nritems - 1)) { 891 ret = btrfs_next_leaf(root, path); |
892 if (ret == 1) | 892 if (ret < 0) { 893 goto out; 894 } else if (ret > 0) { |
893 found_next = 1; | 895 found_next = 1; |
894 if (ret != 0) | |
895 goto insert; | 896 goto insert; |
897 } |
|
896 slot = path->slots[0]; 897 } 898 btrfs_item_key_to_cpu(path->nodes[0], &found_key, slot); 899 if (found_key.objectid != BTRFS_EXTENT_CSUM_OBJECTID || 900 found_key.type != BTRFS_EXTENT_CSUM_KEY) { 901 found_next = 1; 902 goto insert; 903 } --- 222 unchanged lines hidden --- | 898 slot = path->slots[0]; 899 } 900 btrfs_item_key_to_cpu(path->nodes[0], &found_key, slot); 901 if (found_key.objectid != BTRFS_EXTENT_CSUM_OBJECTID || 902 found_key.type != BTRFS_EXTENT_CSUM_KEY) { 903 found_next = 1; 904 goto insert; 905 } --- 222 unchanged lines hidden --- |