A obvious leak, I think no description is needed. Regards YZ --- diff -r a1bde8e797ff extent_map.c --- a/extent_map.c Thu Oct 25 15:49:25 2007 -0400 +++ b/extent_map.c Sun Oct 28 21:36:03 2007 +0800 @@ -1925,6 +1925,7 @@ sector_t extent_bmap(struct address_spac u64 start = iblock << inode->i_blkbits; u64 end = start + (1 << inode->i_blkbits) - 1; struct extent_map *em; + sector_t sector = 0; em = get_extent(inode, NULL, 0, start, end, 0); if (!em || IS_ERR(em)) @@ -1932,9 +1933,12 @@ sector_t extent_bmap(struct address_spac if (em->block_start == EXTENT_MAP_INLINE || em->block_start == EXTENT_MAP_HOLE) - return 0; - - return (em->block_start + start - em->start) >> inode->i_blkbits; + goto out; + + sector = (em->block_start + start - em->start) >> inode->i_blkbits; +out: + free_extent_map(em); + return sector; } static int add_lru(struct extent_map_tree *tree, struct extent_buffer *eb)