diff options
| author | Paul Mackerras <paulus@samba.org> | 2007-05-10 07:08:37 -0400 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2007-05-10 07:08:37 -0400 |
| commit | 2ecf042ef530dd0943e41d84b6344f507941af3e (patch) | |
| tree | 73100361dd74e3f80f14c7c81ba4675948983f44 /fs/direct-io.c | |
| parent | 32a56ebb24f23da1bbaf24292acf85b6c04526ab (diff) | |
| parent | de5603748af8bf7deac403e6ba92887f8d18e812 (diff) | |
Merge branch 'linux-2.6'
Diffstat (limited to 'fs/direct-io.c')
| -rw-r--r-- | fs/direct-io.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/direct-io.c b/fs/direct-io.c index d9d0833444f5..8593f3dfd299 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c | |||
| @@ -439,7 +439,7 @@ static int dio_bio_complete(struct dio *dio, struct bio *bio) | |||
| 439 | * Wait on and process all in-flight BIOs. This must only be called once | 439 | * Wait on and process all in-flight BIOs. This must only be called once |
| 440 | * all bios have been issued so that the refcount can only decrease. | 440 | * all bios have been issued so that the refcount can only decrease. |
| 441 | * This just waits for all bios to make it through dio_bio_complete. IO | 441 | * This just waits for all bios to make it through dio_bio_complete. IO |
| 442 | * errors are propogated through dio->io_error and should be propogated via | 442 | * errors are propagated through dio->io_error and should be propagated via |
| 443 | * dio_complete(). | 443 | * dio_complete(). |
| 444 | */ | 444 | */ |
| 445 | static void dio_await_completion(struct dio *dio) | 445 | static void dio_await_completion(struct dio *dio) |
| @@ -867,7 +867,6 @@ static int do_direct_IO(struct dio *dio) | |||
| 867 | do_holes: | 867 | do_holes: |
| 868 | /* Handle holes */ | 868 | /* Handle holes */ |
| 869 | if (!buffer_mapped(map_bh)) { | 869 | if (!buffer_mapped(map_bh)) { |
| 870 | char *kaddr; | ||
| 871 | loff_t i_size_aligned; | 870 | loff_t i_size_aligned; |
| 872 | 871 | ||
| 873 | /* AKPM: eargh, -ENOTBLK is a hack */ | 872 | /* AKPM: eargh, -ENOTBLK is a hack */ |
| @@ -888,11 +887,8 @@ do_holes: | |||
| 888 | page_cache_release(page); | 887 | page_cache_release(page); |
| 889 | goto out; | 888 | goto out; |
| 890 | } | 889 | } |
| 891 | kaddr = kmap_atomic(page, KM_USER0); | 890 | zero_user_page(page, block_in_page << blkbits, |
| 892 | memset(kaddr + (block_in_page << blkbits), | 891 | 1 << blkbits, KM_USER0); |
| 893 | 0, 1 << blkbits); | ||
| 894 | flush_dcache_page(page); | ||
| 895 | kunmap_atomic(kaddr, KM_USER0); | ||
| 896 | dio->block_in_file++; | 892 | dio->block_in_file++; |
| 897 | block_in_page++; | 893 | block_in_page++; |
| 898 | goto next_block; | 894 | goto next_block; |
