On Sun, 2008-08-17 at 18:54 +0530, Balaji Rao wrote: > > OK. I had copied over this code snippet from > inode.c:btrfs_inode_by_name, > which has the condition 'if (slot >= nritems)' removed now by this. > > changeset: 631:87490dc3bb59 > user: "Yan Zheng" <yanzheng@xxxxxxxx> > date: Thu Jul 24 12:19:32 2008 -0400 > summary: Fix .. lookup corner case Er, isn't that just moving the error case around? That's commit 3dcd1334c286fa4467219302ff2f9a4a190fbb9c in the git tree: http://git.kernel.org/?p=linux/kernel/git/dwmw2/btrfs-kernel-unstable.git;a=commitdiff;h=3dcd1334 Your version fails if the item we want is in slot 0, because we don't jump forward to the next leaf. The new version fails if it's in the _last_ slot -- the return from btrfs_search_slot() now points to the first slot in the next leaf, and we treat that as an error instead of rewinding to the one we want. It's just the same error, but in reverse. Or am I missing something? -- David Woodhouse Open Source Technology Centre David.Woodhouse@xxxxxxxxx Intel Corporation -- 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
