check objectid of item before checking the item type.
Signed-off-by: Yan Zheng <[email protected]>
---
diff -urp 1/fs/btrfs/ctree.c 2/fs/btrfs/ctree.c
--- 1/fs/btrfs/ctree.c 2009-07-24 09:57:18.670312761 +0800
+++ 2/fs/btrfs/ctree.c 2009-07-24 11:23:27.131306044 +0800
@@ -4308,10 +4308,10 @@ int btrfs_previous_item(struct btrfs_roo
path->slots[0]--;
btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]);
- if (found_key.type == type)
- return 0;
if (found_key.objectid < min_objectid)
break;
+ if (found_key.type == type)
+ return 0;
if (found_key.objectid == min_objectid &&
found_key.type < type)
break;
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html