We want to test if path->slots[0] is greater than zero.
Testing for path->slots was a logical error, as it corresponds
to a memory address (start of fixed array) and therefore is
always non-zero.
Signed-off-by: Filipe David Borba Manana <fdmanana@xxxxxxxxx>
---
extent-tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/extent-tree.c b/extent-tree.c
index b0cfe0a..f094266 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -1515,7 +1515,7 @@ again:
* to make sure.
*/
if (ret > 0 && metadata) {
- if (path->slots) {
+ if (path->slots[0]) {
path->slots[0]--;
btrfs_item_key_to_cpu(path->nodes[0], &key,
path->slots[0]);
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html