rem: put_fd(tofd);
add: put_fd(toDescriptor);
context: attr_rename(int fromfd, const char *fromName, int tofd, const char *toName, bool kernel){	struct file_descriptor *fromDescriptor, *toDescriptor;	struct vnode *fromVnode, *toVnode;	int status;	if (fromName == NULL || *fromName == '\0' || toName == NULL || *toName == '\0')		return B_BAD_VALUE;	FUNCTION(("attr_rename: from fd = %d, from name = \"%s\", to fd = %d, to name = \"%s\", kernel %d\n", fromfd, fromName, tofd, toName, kernel));	fromDescriptor = get_fd_and_vnode(fromfd, &fromVnode, kernel);	if (fromDescriptor == NULL)		return B_FILE_ERROR;	toDescriptor = get_fd_and_vnode(tofd, &toVnode, kernel);	if (toDescriptor == NULL) {		status = B_FILE_ERROR;		goto err;	}	// are the files on the same volume?	if (fromVnode->device != toVnode->device) {		status = B_CROSS_DEVICE_LINK;		goto err1;	}	if (FS_CALL(fromVnode, rename_attr))		status = FS_CALL(fromVnode, rename_attr)(fromVnode->mount->cookie, fromVnode->private_node, fromName, toVnode->private_node, toName);	else		status = EROFS;err1:	put_fd(tofd);err:	put_fd(fromfd);	return status;}