All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix min_objectid check in btrfs_previous_item
@ 2009-07-24  5:27 Yan Zheng
  0 siblings, 0 replies; only message in thread
From: Yan Zheng @ 2009-07-24  5:27 UTC (permalink / raw)
  To: chris Mason, linux-btrfs

check objectid of item before checking the item type.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>

---
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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-07-24  5:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-24  5:27 [PATCH] fix min_objectid check in btrfs_previous_item Yan Zheng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.