/* unlocks pages after btrfs_file_write is done with them  */
static noinline void btrfs_drop_pages(struct page **pages, size_t num_pages)
/* unlocks pages after btrfs_file_write is done with them  */
static noinline void btrfs_drop_pages(struct page **pages, size_t num_pages)
{
	size_t i;
	for (i = 0; i < num_pages; i++) {
		if (!pages[i])
			break;
		ClearPageChecked(pages[i]);
		unlock_page(pages[i]);
		mark_page_accessed(pages[i]);
		page_cache_release(pages[i]);
	}
}