diff options
author | Dave Kleikamp <shaggy@linux.vnet.ibm.com> | 2007-03-06 04:42:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-06 12:30:25 -0500 |
commit | 57bf63d69cb6b7064e6fec5e83da4e1918168282 (patch) | |
tree | 506c623d4f756afb91af4ca150f6759d229d3b9f /fs | |
parent | 90675a27fa3eb0e97f1d040b183cceb44316e669 (diff) |
[PATCH] fs: nobh_truncate_page() fix
This fixes a regression caused by 22c8ca78f20724676b6006232bf06cc3e9299539.
nobh_prepare_write() no longer marks the page uptodate, so
nobh_truncate_page() needs to do it.
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/buffer.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index e8504b65176c..1d0852fa728b 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -2365,6 +2365,10 @@ failed: | |||
2365 | } | 2365 | } |
2366 | EXPORT_SYMBOL(nobh_prepare_write); | 2366 | EXPORT_SYMBOL(nobh_prepare_write); |
2367 | 2367 | ||
2368 | /* | ||
2369 | * Make sure any changes to nobh_commit_write() are reflected in | ||
2370 | * nobh_truncate_page(), since it doesn't call commit_write(). | ||
2371 | */ | ||
2368 | int nobh_commit_write(struct file *file, struct page *page, | 2372 | int nobh_commit_write(struct file *file, struct page *page, |
2369 | unsigned from, unsigned to) | 2373 | unsigned from, unsigned to) |
2370 | { | 2374 | { |
@@ -2466,6 +2470,11 @@ int nobh_truncate_page(struct address_space *mapping, loff_t from) | |||
2466 | memset(kaddr + offset, 0, PAGE_CACHE_SIZE - offset); | 2470 | memset(kaddr + offset, 0, PAGE_CACHE_SIZE - offset); |
2467 | flush_dcache_page(page); | 2471 | flush_dcache_page(page); |
2468 | kunmap_atomic(kaddr, KM_USER0); | 2472 | kunmap_atomic(kaddr, KM_USER0); |
2473 | /* | ||
2474 | * It would be more correct to call aops->commit_write() | ||
2475 | * here, but this is more efficient. | ||
2476 | */ | ||
2477 | SetPageUptodate(page); | ||
2469 | set_page_dirty(page); | 2478 | set_page_dirty(page); |
2470 | } | 2479 | } |
2471 | unlock_page(page); | 2480 | unlock_page(page); |