Hello The first change removes potential double free, the second fix a off by one error. Regards YZ diff -r d0921c0349a9 inode.c --- a/inode.c Fri Sep 14 10:23:29 2007 -0400 +++ b/inode.c Mon Sep 17 18:49:39 2007 +0800 @@ -206,7 +206,6 @@ void btrfs_read_locked_inode(struct inod memcpy(&location, &BTRFS_I(inode)->location, sizeof(location)); ret = btrfs_lookup_inode(NULL, root, path, &location, 0); if (ret) { - btrfs_free_path(path); goto make_bad; } inode_item = btrfs_item_ptr(btrfs_buffer_leaf(path->nodes[0]), @@ -1519,7 +1518,7 @@ again: flush_dcache_page(result->b_page); kunmap(page); set_extent_uptodate(em_tree, extent_start, - extent_end, GFP_NOFS); + extent_end - 1, GFP_NOFS); goto insert; } else { printk("unkknown found_type %d\n", found_type);