VM: add "vm_munmap()" helper function
Like the vm_brk() function, this is the same as "do_munmap()", except it does the VM locking for the caller. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
@@ -157,11 +157,9 @@ static int i810_unmap_buffer(struct drm_buf *buf)
|
||||
if (buf_priv->currently_mapped != I810_BUF_MAPPED)
|
||||
return -EINVAL;
|
||||
|
||||
down_write(¤t->mm->mmap_sem);
|
||||
retcode = do_munmap(current->mm,
|
||||
retcode = vm_munmap(current->mm,
|
||||
(unsigned long)buf_priv->virtual,
|
||||
(size_t) buf->total);
|
||||
up_write(¤t->mm->mmap_sem);
|
||||
|
||||
buf_priv->currently_mapped = I810_BUF_UNMAPPED;
|
||||
buf_priv->virtual = NULL;
|
||||
|
Reference in New Issue
Block a user