patch-2.4.3 linux/drivers/char/drm/i810_dma.c
Next file: linux/drivers/char/drm/mga_bufs.c
Previous file: linux/drivers/char/drm/ffb_drv.c
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
Mon Mar 19 12:35:08 2001
- Orig file:
v2.4.2/linux/drivers/char/drm/i810_dma.c
- Orig date:
Mon Dec 11 12:39:44 2000
diff -u --recursive --new-file v2.4.2/linux/drivers/char/drm/i810_dma.c linux/drivers/char/drm/i810_dma.c
@@ -192,7 +192,7 @@
if(buf_priv->currently_mapped == I810_BUF_MAPPED) return -EINVAL;
if(VM_DONTCOPY != 0) {
- down(¤t->mm->mmap_sem);
+ down_write(¤t->mm->mmap_sem);
old_fops = filp->f_op;
filp->f_op = &i810_buffer_fops;
dev_priv->mmap_buffer = buf;
@@ -208,7 +208,7 @@
retcode = (signed int)buf_priv->virtual;
buf_priv->virtual = 0;
}
- up(¤t->mm->mmap_sem);
+ up_write(¤t->mm->mmap_sem);
} else {
buf_priv->virtual = buf_priv->kernel_virtual;
buf_priv->currently_mapped = I810_BUF_MAPPED;
@@ -224,7 +224,7 @@
if(VM_DONTCOPY != 0) {
if(buf_priv->currently_mapped != I810_BUF_MAPPED)
return -EINVAL;
- down(¤t->mm->mmap_sem);
+ down_write(¤t->mm->mmap_sem);
#if LINUX_VERSION_CODE < 0x020399
retcode = do_munmap((unsigned long)buf_priv->virtual,
(size_t) buf->total);
@@ -233,7 +233,7 @@
(unsigned long)buf_priv->virtual,
(size_t) buf->total);
#endif
- up(¤t->mm->mmap_sem);
+ up_write(¤t->mm->mmap_sem);
}
buf_priv->currently_mapped = I810_BUF_UNMAPPED;
buf_priv->virtual = 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)