Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
bfce281c
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bfce281c
编写于
4月 20, 2012
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
kill mm argument of vm_munmap()
it's always current->mm Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
9f3a4afb
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
12 addition
and
11 deletion
+12
-11
arch/ia64/kernel/perfmon.c
arch/ia64/kernel/perfmon.c
+1
-1
arch/sparc/kernel/sys_sparc_64.c
arch/sparc/kernel/sys_sparc_64.c
+1
-1
arch/x86/kvm/x86.c
arch/x86/kvm/x86.c
+1
-1
drivers/gpu/drm/i810/i810_dma.c
drivers/gpu/drm/i810/i810_dma.c
+1
-2
fs/aio.c
fs/aio.c
+1
-1
include/linux/mm.h
include/linux/mm.h
+1
-1
mm/mmap.c
mm/mmap.c
+3
-2
mm/nommu.c
mm/nommu.c
+3
-2
未找到文件。
arch/ia64/kernel/perfmon.c
浏览文件 @
bfce281c
...
...
@@ -1468,7 +1468,7 @@ pfm_remove_smpl_mapping(void *vaddr, unsigned long size)
/*
* does the actual unmapping
*/
r
=
vm_munmap
(
current
->
mm
,
(
unsigned
long
)
vaddr
,
size
);
r
=
vm_munmap
((
unsigned
long
)
vaddr
,
size
);
if
(
r
!=
0
)
{
printk
(
KERN_ERR
"perfmon: [%d] unable to unmap sampling buffer @%p size=%lu
\n
"
,
task_pid_nr
(
task
),
vaddr
,
size
);
...
...
arch/sparc/kernel/sys_sparc_64.c
浏览文件 @
bfce281c
...
...
@@ -569,7 +569,7 @@ SYSCALL_DEFINE2(64_munmap, unsigned long, addr, size_t, len)
if
(
invalid_64bit_range
(
addr
,
len
))
return
-
EINVAL
;
return
vm_munmap
(
current
->
mm
,
addr
,
len
);
return
vm_munmap
(
addr
,
len
);
}
extern
unsigned
long
do_mremap
(
unsigned
long
addr
,
...
...
arch/x86/kvm/x86.c
浏览文件 @
bfce281c
...
...
@@ -6364,7 +6364,7 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
if
(
!
user_alloc
&&
!
old
.
user_alloc
&&
old
.
rmap
&&
!
npages
)
{
int
ret
;
ret
=
vm_munmap
(
current
->
mm
,
old
.
userspace_addr
,
ret
=
vm_munmap
(
old
.
userspace_addr
,
old
.
npages
*
PAGE_SIZE
);
if
(
ret
<
0
)
printk
(
KERN_WARNING
...
...
drivers/gpu/drm/i810/i810_dma.c
浏览文件 @
bfce281c
...
...
@@ -158,8 +158,7 @@ static int i810_unmap_buffer(struct drm_buf *buf)
if
(
buf_priv
->
currently_mapped
!=
I810_BUF_MAPPED
)
return
-
EINVAL
;
retcode
=
vm_munmap
(
current
->
mm
,
(
unsigned
long
)
buf_priv
->
virtual
,
retcode
=
vm_munmap
((
unsigned
long
)
buf_priv
->
virtual
,
(
size_t
)
buf
->
total
);
buf_priv
->
currently_mapped
=
I810_BUF_UNMAPPED
;
...
...
fs/aio.c
浏览文件 @
bfce281c
...
...
@@ -94,7 +94,7 @@ static void aio_free_ring(struct kioctx *ctx)
if
(
info
->
mmap_size
)
{
BUG_ON
(
ctx
->
mm
!=
current
->
mm
);
vm_munmap
(
ctx
->
mm
,
info
->
mmap_base
,
info
->
mmap_size
);
vm_munmap
(
info
->
mmap_base
,
info
->
mmap_size
);
}
if
(
info
->
ring_pages
&&
info
->
ring_pages
!=
info
->
internal_pages
)
...
...
include/linux/mm.h
浏览文件 @
bfce281c
...
...
@@ -1403,7 +1403,7 @@ extern int do_munmap(struct mm_struct *, unsigned long, size_t);
/* These take the mm semaphore themselves */
extern
unsigned
long
vm_brk
(
unsigned
long
,
unsigned
long
);
extern
int
vm_munmap
(
struct
mm_struct
*
,
unsigned
long
,
size_t
);
extern
int
vm_munmap
(
unsigned
long
,
size_t
);
extern
unsigned
long
vm_mmap
(
struct
file
*
,
unsigned
long
,
unsigned
long
,
unsigned
long
,
unsigned
long
,
unsigned
long
);
...
...
mm/mmap.c
浏览文件 @
bfce281c
...
...
@@ -2134,9 +2134,10 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
}
EXPORT_SYMBOL
(
do_munmap
);
int
vm_munmap
(
struct
mm_struct
*
mm
,
unsigned
long
start
,
size_t
len
)
int
vm_munmap
(
unsigned
long
start
,
size_t
len
)
{
int
ret
;
struct
mm_struct
*
mm
=
current
->
mm
;
down_write
(
&
mm
->
mmap_sem
);
ret
=
do_munmap
(
mm
,
start
,
len
);
...
...
@@ -2148,7 +2149,7 @@ EXPORT_SYMBOL(vm_munmap);
SYSCALL_DEFINE2
(
munmap
,
unsigned
long
,
addr
,
size_t
,
len
)
{
profile_munmap
(
addr
);
return
vm_munmap
(
current
->
mm
,
addr
,
len
);
return
vm_munmap
(
addr
,
len
);
}
static
inline
void
verify_mm_writelocked
(
struct
mm_struct
*
mm
)
...
...
mm/nommu.c
浏览文件 @
bfce281c
...
...
@@ -1734,8 +1734,9 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
}
EXPORT_SYMBOL
(
do_munmap
);
int
vm_munmap
(
struct
mm_struct
*
mm
,
unsigned
long
addr
,
size_t
len
)
int
vm_munmap
(
unsigned
long
addr
,
size_t
len
)
{
struct
mm_struct
*
mm
=
current
->
mm
;
int
ret
;
down_write
(
&
mm
->
mmap_sem
);
...
...
@@ -1747,7 +1748,7 @@ EXPORT_SYMBOL(vm_munmap);
SYSCALL_DEFINE2
(
munmap
,
unsigned
long
,
addr
,
size_t
,
len
)
{
return
vm_munmap
(
current
->
mm
,
addr
,
len
);
return
vm_munmap
(
addr
,
len
);
}
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录