- /*
- * Set all bytes in the page to 0xff. It doesn't matter if we
- * go beyond i_size, because ntfs_writepage() will take care of
- * that for us.
- */
- kaddr = (u8*)kmap_atomic(page, KM_USER0);
- memset(kaddr, 0xff, PAGE_CACHE_SIZE);
- flush_dcache_page(page);
- kunmap_atomic(kaddr, KM_USER0);
- /*
- * If the page has buffers, mark them uptodate since buffer
- * state and not page state is definitive in 2.6 kernels.
- */
- if (page_has_buffers(page)) {
- struct buffer_head *bh, *head;
-
- bh = head = page_buffers(page);
- do {
- set_buffer_uptodate(bh);
- } while ((bh = bh->b_this_page) != head);
- }
- /* Now that buffers are uptodate, set the page uptodate, too. */
- SetPageUptodate(page);
- /*
- * Set the page and all its buffers dirty and mark the inode
- * dirty, too. The VM will write the page later on.
- */
- set_page_dirty(page);
- /* Finally unlock and release the page. */
- unlock_page(page);
- page_cache_release(page);
- }
- /* We set the flag so we do not clear the log file again on remount. */
- NVolSetLogFileEmpty(vol);
-done: