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