/* Whenever a lookup succeeds, we know the parent directories are all valid, so we want to update the dentry timestamps. N.B. Move this to dcache?  */
void smb_renew_times(struct dentry *dentry)
/* Whenever a lookup succeeds, we know the parent directories are all valid, so we want to update the dentry timestamps. N.B. Move this to dcache?  */
void smb_renew_times(struct dentry *dentry)
{
	dget(dentry);
	spin_lock(&dentry->d_lock);
	for (;;) {
		struct dentry *parent;
		dentry->d_time = jiffies;
		if (IS_ROOT(dentry))
			break;
		parent = dentry->d_parent;
		dget(parent);
		spin_unlock(&dentry->d_lock);
		dput(dentry);
		dentry = parent;
		spin_lock(&dentry->d_lock);
	}
	spin_unlock(&dentry->d_lock);
	dput(dentry);
}