return drm_rmmap(dev, request.handle); 
down(&dev->struct_sem); list_for_each(list, &dev->maplist->head) { drm_map_list_t *r_list = list_entry(list, drm_map_list_t, head);  if (r_list->map && r_list->map->handle == request.handle && r_list->map->flags & _DRM_REMOVABLE) { map = r_list->map; break; } }  /* List has wrapped around to the head pointer, or its empty we didn't * find anything. */ if (list == (&dev->maplist->head)) { up(&dev->struct_sem); return -EINVAL; }  if (!map) return -EINVAL;  /* Register and framebuffer maps are permanent */ if ((map->type == _DRM_REGISTERS) || (map->type == _DRM_FRAME_BUFFER)) { up(&dev->struct_sem); return 0; }  ret = drm_rmmap_locked(dev, map);  up(&dev->struct_sem);  return ret; 
int drm_rmmap_ioctl(struct inode *inode, struct file *filp,		    unsigned int cmd, unsigned long arg){	drm_file_t *priv = filp->private_data;	drm_device_t *dev = priv->head->dev;	drm_map_t request;	if (copy_from_user(&request, (drm_map_t __user *)arg, sizeof(request))) {		return -EFAULT;	}	return drm_rmmap(dev, request.handle);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/836cf0465c422ee6d654060edd7c620d9cf0c09c/drm_bufs.c/buggy/drivers/char/drm/drm_bufs.c