/* Replace the fs->{rootmnt,root} with {mnt,dentry}. Put the old values. It can block.  */
void set_fs_root(struct fs_struct *fs, struct path *path)
/* Replace the fs->{rootmnt,root} with {mnt,dentry}. Put the old values. It can block.  */
void set_fs_root(struct fs_struct *fs, struct path *path)
{
	struct path old_root;
	write_lock(&fs->lock);
	old_root = fs->root;
	fs->root = *path;
	path_get(path);
	write_unlock(&fs->lock);
	if (old_root.dentry)
		path_put(&old_root);
}