Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
f74ac015
K
Kernel
项目概览
openeuler
/
Kernel
接近 2 年 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
f74ac015
编写于
2月 20, 2017
作者:
M
Miklos Szeredi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mm: use helper for calling f_op->mmap()
Signed-off-by:
N
Miklos Szeredi
<
mszeredi@redhat.com
>
上级
bb7462b6
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
12 addition
and
7 deletion
+12
-7
drivers/gpu/drm/i915/i915_gem_dmabuf.c
drivers/gpu/drm/i915/i915_gem_dmabuf.c
+1
-1
drivers/gpu/drm/vgem/vgem_drv.c
drivers/gpu/drm/vgem/vgem_drv.c
+1
-1
fs/coda/file.c
fs/coda/file.c
+1
-1
include/linux/fs.h
include/linux/fs.h
+5
-0
ipc/shm.c
ipc/shm.c
+1
-1
mm/mmap.c
mm/mmap.c
+1
-1
mm/nommu.c
mm/nommu.c
+2
-2
未找到文件。
drivers/gpu/drm/i915/i915_gem_dmabuf.c
浏览文件 @
f74ac015
...
@@ -141,7 +141,7 @@ static int i915_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *
...
@@ -141,7 +141,7 @@ static int i915_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *
if
(
!
obj
->
base
.
filp
)
if
(
!
obj
->
base
.
filp
)
return
-
ENODEV
;
return
-
ENODEV
;
ret
=
obj
->
base
.
filp
->
f_op
->
mmap
(
obj
->
base
.
filp
,
vma
);
ret
=
call_
mmap
(
obj
->
base
.
filp
,
vma
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
...
drivers/gpu/drm/vgem/vgem_drv.c
浏览文件 @
f74ac015
...
@@ -287,7 +287,7 @@ static int vgem_prime_mmap(struct drm_gem_object *obj,
...
@@ -287,7 +287,7 @@ static int vgem_prime_mmap(struct drm_gem_object *obj,
if
(
!
obj
->
filp
)
if
(
!
obj
->
filp
)
return
-
ENODEV
;
return
-
ENODEV
;
ret
=
obj
->
filp
->
f_op
->
mmap
(
obj
->
filp
,
vma
);
ret
=
call_
mmap
(
obj
->
filp
,
vma
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
...
fs/coda/file.c
浏览文件 @
f74ac015
...
@@ -96,7 +96,7 @@ coda_file_mmap(struct file *coda_file, struct vm_area_struct *vma)
...
@@ -96,7 +96,7 @@ coda_file_mmap(struct file *coda_file, struct vm_area_struct *vma)
cfi
->
cfi_mapcount
++
;
cfi
->
cfi_mapcount
++
;
spin_unlock
(
&
cii
->
c_lock
);
spin_unlock
(
&
cii
->
c_lock
);
return
host_file
->
f_op
->
mmap
(
host_file
,
vma
);
return
call_
mmap
(
host_file
,
vma
);
}
}
int
coda_open
(
struct
inode
*
coda_inode
,
struct
file
*
coda_file
)
int
coda_open
(
struct
inode
*
coda_inode
,
struct
file
*
coda_file
)
...
...
include/linux/fs.h
浏览文件 @
f74ac015
...
@@ -1727,6 +1727,11 @@ static inline ssize_t call_write_iter(struct file *file, struct kiocb *kio,
...
@@ -1727,6 +1727,11 @@ static inline ssize_t call_write_iter(struct file *file, struct kiocb *kio,
return
file
->
f_op
->
write_iter
(
kio
,
iter
);
return
file
->
f_op
->
write_iter
(
kio
,
iter
);
}
}
static
inline
int
call_mmap
(
struct
file
*
file
,
struct
vm_area_struct
*
vma
)
{
return
file
->
f_op
->
mmap
(
file
,
vma
);
}
ssize_t
rw_copy_check_uvector
(
int
type
,
const
struct
iovec
__user
*
uvector
,
ssize_t
rw_copy_check_uvector
(
int
type
,
const
struct
iovec
__user
*
uvector
,
unsigned
long
nr_segs
,
unsigned
long
fast_segs
,
unsigned
long
nr_segs
,
unsigned
long
fast_segs
,
struct
iovec
*
fast_pointer
,
struct
iovec
*
fast_pointer
,
...
...
ipc/shm.c
浏览文件 @
f74ac015
...
@@ -423,7 +423,7 @@ static int shm_mmap(struct file *file, struct vm_area_struct *vma)
...
@@ -423,7 +423,7 @@ static int shm_mmap(struct file *file, struct vm_area_struct *vma)
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
ret
=
sfd
->
file
->
f_op
->
mmap
(
sfd
->
file
,
vma
);
ret
=
call_
mmap
(
sfd
->
file
,
vma
);
if
(
ret
)
{
if
(
ret
)
{
shm_close
(
vma
);
shm_close
(
vma
);
return
ret
;
return
ret
;
...
...
mm/mmap.c
浏览文件 @
f74ac015
...
@@ -1668,7 +1668,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
...
@@ -1668,7 +1668,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
* new file must not have been exposed to user-space, yet.
* new file must not have been exposed to user-space, yet.
*/
*/
vma
->
vm_file
=
get_file
(
file
);
vma
->
vm_file
=
get_file
(
file
);
error
=
file
->
f_op
->
mmap
(
file
,
vma
);
error
=
call_
mmap
(
file
,
vma
);
if
(
error
)
if
(
error
)
goto
unmap_and_free_vma
;
goto
unmap_and_free_vma
;
...
...
mm/nommu.c
浏览文件 @
f74ac015
...
@@ -1084,7 +1084,7 @@ static int do_mmap_shared_file(struct vm_area_struct *vma)
...
@@ -1084,7 +1084,7 @@ static int do_mmap_shared_file(struct vm_area_struct *vma)
{
{
int
ret
;
int
ret
;
ret
=
vma
->
vm_file
->
f_op
->
mmap
(
vma
->
vm_file
,
vma
);
ret
=
call_
mmap
(
vma
->
vm_file
,
vma
);
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
vma
->
vm_region
->
vm_top
=
vma
->
vm_region
->
vm_end
;
vma
->
vm_region
->
vm_top
=
vma
->
vm_region
->
vm_end
;
return
0
;
return
0
;
...
@@ -1115,7 +1115,7 @@ static int do_mmap_private(struct vm_area_struct *vma,
...
@@ -1115,7 +1115,7 @@ static int do_mmap_private(struct vm_area_struct *vma,
* - VM_MAYSHARE will be set if it may attempt to share
* - VM_MAYSHARE will be set if it may attempt to share
*/
*/
if
(
capabilities
&
NOMMU_MAP_DIRECT
)
{
if
(
capabilities
&
NOMMU_MAP_DIRECT
)
{
ret
=
vma
->
vm_file
->
f_op
->
mmap
(
vma
->
vm_file
,
vma
);
ret
=
call_
mmap
(
vma
->
vm_file
,
vma
);
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
/* shouldn't return success if we're not sharing */
/* shouldn't return success if we're not sharing */
BUG_ON
(
!
(
vma
->
vm_flags
&
VM_MAYSHARE
));
BUG_ON
(
!
(
vma
->
vm_flags
&
VM_MAYSHARE
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录