/* note that a page has finished being written to the cache  */
static void fscache_end_page_write(struct fscache_object *object, struct page *page)
/* note that a page has finished being written to the cache  */
static void fscache_end_page_write(struct fscache_object *object, struct page *page)
{
	struct fscache_cookie *cookie;
	struct page *xpage = NULL;
	spin_lock(&object->lock);
	cookie = object->cookie;
	if (cookie) {
		spin_lock(&cookie->stores_lock);
		radix_tree_tag_clear(&cookie->stores, page->index,
				     FSCACHE_COOKIE_STORING_TAG);
		if (!radix_tree_tag_get(&cookie->stores, page->index,
					FSCACHE_COOKIE_PENDING_TAG)) {
			fscache_stat(&fscache_n_store_radix_deletes);
			xpage = radix_tree_delete(&cookie->stores, page->index);
		}
		spin_unlock(&cookie->stores_lock);
		wake_up_bit(&cookie->flags, 0);
	}
	spin_unlock(&object->lock);
	if (xpage)
		page_cache_release(xpage);
}