/* NOTE: we take the inode's blockdev's mapping's private_lock. Which assumes that all the buffers are against the blockdev. Not true for reiserfs.  */
void invalidate_inode_buffers(struct inode *inode)
/* NOTE: we take the inode's blockdev's mapping's private_lock. Which assumes that all the buffers are against the blockdev. Not true for reiserfs.  */
void invalidate_inode_buffers(struct inode *inode)
{
	if (inode_has_buffers(inode)) {
		struct address_space *mapping = &inode->i_data;
		struct list_head *list = &mapping->private_list;
		struct address_space *buffer_mapping = mapping->assoc_mapping;
		spin_lock(&buffer_mapping->private_lock);
		while (!list_empty(list))
			__remove_assoc_queue(BH_ENTRY(list->next));
		spin_unlock(&buffer_mapping->private_lock);
	}
}