/* inotify_inode_is_dead - an inode has been deleted, cleanup any watches @inode: inode that is about to be removed  */
void inotify_inode_is_dead(struct inode *inode)
/* inotify_inode_is_dead - an inode has been deleted, cleanup any watches @inode: inode that is about to be removed  */
void inotify_inode_is_dead(struct inode *inode)
{
	struct inotify_watch *watch, *next;
	mutex_lock(&inode->inotify_mutex);
	list_for_each_entry_safe(watch, next, &inode->inotify_watches, i_list) {
		struct inotify_handle *ih = watch->ih;
		mutex_lock(&ih->mutex);
		inotify_remove_watch_locked(ih, watch);
		mutex_unlock(&ih->mutex);
	}
	mutex_unlock(&inode->inotify_mutex);
}