[PATCH]fix the algorithm for addname in xfs_da_node_lookup_int

Kevin Xu
2008-03-23T01:03:34Z

[-- Attachment #1: Type: text/plain, Size: 57 bytes --]

fix the algorithm for addname in xfs_da_node_lookup_int

[-- Attachment #2: usig-xfs-fix-080323.patch --]
[-- Type: text/x-patch, Size: 535 bytes --]

--- linux-2.6-xfs/fs/xfs/xfs_da_btree.c 2007-09-21 14:14:35.000000000 +0800
+++ linux-xfs-usig/fs/xfs/xfs_da_btree.c 2008-03-23 08:19:13.583751436 +0800
@@ -1161,7 +1161,7 @@ xfs_da_node_lookup_int(xfs_da_state_t *s
ASSERT(0);
return XFS_ERROR(EFSCORRUPTED);
}
- if (((retval == ENOENT) || (retval == ENOATTR)) &&
+ if ((((retval == ENOENT) && (state->extrablk.index == -1)) || (retval == ENOATTR)) &&
(blk->hashval == args->hashval)) {
error = xfs_da_path_shift(state, &state->path, 1, 1,
&retval);