Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128516
b: refs/heads/master
c: c67cda1
h: refs/heads/master
v: v3
  • Loading branch information
Yan authored and Chris Mason committed Sep 25, 2008
1 parent ca92f36 commit 46c506b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 44ec0b7179b9bce7df1080370f51314a24a00216
refs/heads/master: c67cda1758130f3e437744c4c2ec4a7cc25564e3
8 changes: 6 additions & 2 deletions trunk/fs/btrfs/extent_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -1924,6 +1924,7 @@ sector_t extent_bmap(struct address_space *mapping, sector_t iblock,
struct inode *inode = mapping->host;
u64 start = iblock << inode->i_blkbits;
u64 end = start + (1 << inode->i_blkbits) - 1;
sector_t sector = 0;
struct extent_map *em;

em = get_extent(inode, NULL, 0, start, end, 0);
Expand All @@ -1932,9 +1933,12 @@ sector_t extent_bmap(struct address_space *mapping, sector_t iblock,

if (em->block_start == EXTENT_MAP_INLINE ||
em->block_start == EXTENT_MAP_HOLE)
return 0;
goto out;

return (em->block_start + start - em->start) >> inode->i_blkbits;
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)
Expand Down

0 comments on commit 46c506b

Please sign in to comment.