Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284427
b: refs/heads/master
c: ae55e1a
h: refs/heads/master
i:
  284425: a867692
  284423: 5a60ece
v: v3
  • Loading branch information
Tao Ma authored and Linus Torvalds committed Jan 13, 2012
1 parent abdbee2 commit 66970cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 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: 45dac90f0ca7d9efeda8f3d416c808c71207bf20
refs/heads/master: ae55e1aaa7e2e57e538cb98cf617f511c5dc4f73
11 changes: 4 additions & 7 deletions trunk/fs/direct-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,9 +580,8 @@ static int get_more_blocks(struct dio *dio, struct dio_submit *sdio,
{
int ret;
sector_t fs_startblk; /* Into file, in filesystem-sized blocks */
sector_t fs_endblk; /* Into file, in filesystem-sized blocks */
unsigned long fs_count; /* Number of filesystem-sized blocks */
unsigned long dio_count;/* Number of dio_block-sized blocks */
unsigned long blkmask;
int create;

/*
Expand All @@ -593,11 +592,9 @@ static int get_more_blocks(struct dio *dio, struct dio_submit *sdio,
if (ret == 0) {
BUG_ON(sdio->block_in_file >= sdio->final_block_in_request);
fs_startblk = sdio->block_in_file >> sdio->blkfactor;
dio_count = sdio->final_block_in_request - sdio->block_in_file;
fs_count = dio_count >> sdio->blkfactor;
blkmask = (1 << sdio->blkfactor) - 1;
if (dio_count & blkmask)
fs_count++;
fs_endblk = (sdio->final_block_in_request - 1) >>
sdio->blkfactor;
fs_count = fs_endblk - fs_startblk + 1;

map_bh->b_state = 0;
map_bh->b_size = fs_count << dio->inode->i_blkbits;
Expand Down

0 comments on commit 66970cd

Please sign in to comment.