summaryrefslogtreecommitdiff
path: root/linux-core/drm_fops.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-10-03 12:08:07 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-10-03 12:08:07 +0200
commitcee659afb56e7ac443402ac791144f391721061e (patch)
tree45d68bf6a269f626f6a2178c8c0b5987af5c96e7 /linux-core/drm_fops.c
parent16be6ba63a41f03e98a741464d3b51eefb277373 (diff)
Get rid of all ugly PTE hacks.
Diffstat (limited to 'linux-core/drm_fops.c')
-rw-r--r--linux-core/drm_fops.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/linux-core/drm_fops.c b/linux-core/drm_fops.c
index 5593e55c..b60ced34 100644
--- a/linux-core/drm_fops.c
+++ b/linux-core/drm_fops.c
@@ -158,6 +158,12 @@ int drm_open(struct inode *inode, struct file *filp)
}
spin_unlock(&dev->count_lock);
}
+ mutex_lock(&dev->struct_mutex);
+ BUG_ON((dev->dev_mapping != NULL) &&
+ (dev->dev_mapping != inode->i_mapping));
+ if (dev->dev_mapping == NULL)
+ dev->dev_mapping = inode->i_mapping;
+ mutex_unlock(&dev->struct_mutex);
return retcode;
}
@@ -465,6 +471,7 @@ int drm_release(struct inode *inode, struct file *filp)
drm_fasync(-1, filp, 0);
mutex_lock(&dev->ctxlist_mutex);
+
if (dev->ctxlist && (!list_empty(&dev->ctxlist->head))) {
drm_ctx_list_t *pos, *n;