|
@@ -425,6 +425,10 @@ int drm_release(struct inode *inode, struct file *filp)
|
|
|
|
|
|
DRM_DEBUG("open_count = %d\n", dev->open_count);
|
|
|
|
|
|
+ mutex_lock(&dev->struct_mutex);
|
|
|
+ list_del(&file_priv->lhead);
|
|
|
+ mutex_unlock(&dev->struct_mutex);
|
|
|
+
|
|
|
if (dev->driver->preclose)
|
|
|
dev->driver->preclose(dev, file_priv);
|
|
|
|
|
@@ -518,10 +522,6 @@ int drm_release(struct inode *inode, struct file *filp)
|
|
|
file_priv->is_master = 0;
|
|
|
mutex_unlock(&dev->master_mutex);
|
|
|
|
|
|
- mutex_lock(&dev->struct_mutex);
|
|
|
- list_del(&file_priv->lhead);
|
|
|
- mutex_unlock(&dev->struct_mutex);
|
|
|
-
|
|
|
if (dev->driver->postclose)
|
|
|
dev->driver->postclose(dev, file_priv);
|
|
|
|