Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255100
b: refs/heads/master
c: bf1a1b3
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Christoph Hellwig committed Jun 30, 2011
1 parent e3e2dc8 commit b2708e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: 2b4f9ca8a575ce6d7ddb59d668e2be250bf86a8f
refs/heads/master: bf1a1b31fa3ea24e3a90821d69a5c3da066f7d6c
9 changes: 6 additions & 3 deletions trunk/fs/hfsplus/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ int hfsplus_get_block(struct inode *inode, sector_t iblock,
struct hfsplus_inode_info *hip = HFSPLUS_I(inode);
int res = -EIO;
u32 ablock, dblock, mask;
sector_t sector;
int was_dirty = 0;
int shift;

Expand Down Expand Up @@ -255,10 +256,12 @@ int hfsplus_get_block(struct inode *inode, sector_t iblock,
done:
dprint(DBG_EXTENT, "get_block(%lu): %llu - %u\n",
inode->i_ino, (long long)iblock, dblock);

mask = (1 << sbi->fs_shift) - 1;
map_bh(bh_result, sb,
(dblock << sbi->fs_shift) + sbi->blockoffset +
(iblock & mask));
sector = ((sector_t)dblock << sbi->fs_shift) +
sbi->blockoffset + (iblock & mask);
map_bh(bh_result, sb, sector);

if (create) {
set_buffer_new(bh_result);
hip->phys_size += sb->s_blocksize;
Expand Down

0 comments on commit b2708e3

Please sign in to comment.