Commit c33e05c5 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] reiserfs writepage-versus-truncate fix

From: Oleg Drokin <green@namesys.com>

The conversion of reiserfs to not return errors from
writepage-outside-i_size was incorrect.  Fix.
parent bc6e6ea4
......@@ -2048,8 +2048,8 @@ static int reiserfs_write_full_page(struct page *page, struct writeback_control
last_offset = inode->i_size & (PAGE_CACHE_SIZE - 1) ;
/* no file contents in this page */
if (page->index >= end_index + 1 || !last_offset) {
error = 0 ;
goto done ;
unlock_page(page);
return 0;
}
kaddr = kmap_atomic(page, KM_USER0);
memset(kaddr + last_offset, 0, PAGE_CACHE_SIZE-last_offset) ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment