Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19658
b: refs/heads/master
c: 35dc816
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Moyer authored and Linus Torvalds committed Feb 3, 2006
1 parent 4d63732 commit 007bcdc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: 835417967c10b6dfaffdffddba59196196e5d431
refs/heads/master: 35dc8161d0a6fa5e654bcb3d6240acc9ecb0a259
9 changes: 8 additions & 1 deletion trunk/fs/direct-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,15 +857,22 @@ static int do_direct_IO(struct dio *dio)
/* Handle holes */
if (!buffer_mapped(map_bh)) {
char *kaddr;
loff_t i_size_aligned;

/* AKPM: eargh, -ENOTBLK is a hack */
if (dio->rw == WRITE) {
page_cache_release(page);
return -ENOTBLK;
}

/*
* Be sure to account for a partial block as the
* last block in the file
*/
i_size_aligned = ALIGN(i_size_read(dio->inode),
1 << blkbits);
if (dio->block_in_file >=
i_size_read(dio->inode)>>blkbits) {
i_size_aligned >> blkbits) {
/* We hit eof */
page_cache_release(page);
goto out;
Expand Down

0 comments on commit 007bcdc

Please sign in to comment.