/* If warn is true, then emit a warning if the page is not uptodate and has not been truncated.  */
static void __set_page_dirty(struct page *page, struct address_space *mapping, int warn)
/* If warn is true, then emit a warning if the page is not uptodate and has not been truncated.  */
static void __set_page_dirty(struct page *page, struct address_space *mapping, int warn)
{
	spin_lock_irq(&mapping->tree_lock);
	if (page->mapping) {
		WARN_ON_ONCE(warn && !PageUptodate(page));
		account_page_dirtied(page, mapping);
		radix_tree_tag_set(&mapping->page_tree,
				page_index(page), PAGECACHE_TAG_DIRTY);
	}
	spin_unlock_irq(&mapping->tree_lock);
	__mark_inode_dirty(mapping->host, I_DIRTY_PAGES);
}