/* Get child dentry flag into synch with parent inode. Flag should always be clear for negative dentrys.  */
static void set_dentry_child_flags(struct inode *inode, int watched)
/* Get child dentry flag into synch with parent inode. Flag should always be clear for negative dentrys.  */
static void set_dentry_child_flags(struct inode *inode, int watched)
{
	struct dentry *alias;
	spin_lock(&dcache_lock);
	list_for_each_entry(alias, &inode->i_dentry, d_alias) {
		struct dentry *child;
		list_for_each_entry(child, &alias->d_subdirs, d_u.d_child) {
			if (!child->d_inode)
				continue;
			spin_lock(&child->d_lock);
			if (watched)
				child->d_flags |= DCACHE_INOTIFY_PARENT_WATCHED;
			else
				child->d_flags &=~DCACHE_INOTIFY_PARENT_WATCHED;
			spin_unlock(&child->d_lock);
		}
	}
	spin_unlock(&dcache_lock);
}