diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-20 19:20:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-20 20:29:13 -0400 |
commit | a46ef99d80817a167477ed1c8b4d90ee0c2e726f (patch) | |
tree | 3d8c980c627e8b9c009dbf63628a9be8b8d1069f /drivers/gpu | |
parent | e4eb1ff61b323d6141614e5458a1f53c7046ff8e (diff) |
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i810/i810_dma.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c index 2c8a60c3b98e..b85337f06fbf 100644 --- a/drivers/gpu/drm/i810/i810_dma.c +++ b/drivers/gpu/drm/i810/i810_dma.c | |||
@@ -157,11 +157,9 @@ static int i810_unmap_buffer(struct drm_buf *buf) | |||
157 | if (buf_priv->currently_mapped != I810_BUF_MAPPED) | 157 | if (buf_priv->currently_mapped != I810_BUF_MAPPED) |
158 | return -EINVAL; | 158 | return -EINVAL; |
159 | 159 | ||
160 | down_write(¤t->mm->mmap_sem); | 160 | retcode = vm_munmap(current->mm, |
161 | retcode = do_munmap(current->mm, | ||
162 | (unsigned long)buf_priv->virtual, | 161 | (unsigned long)buf_priv->virtual, |
163 | (size_t) buf->total); | 162 | (size_t) buf->total); |
164 | up_write(¤t->mm->mmap_sem); | ||
165 | 163 | ||
166 | buf_priv->currently_mapped = I810_BUF_UNMAPPED; | 164 | buf_priv->currently_mapped = I810_BUF_UNMAPPED; |
167 | buf_priv->virtual = NULL; | 165 | buf_priv->virtual = NULL; |