Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
da56e45b
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
da56e45b
编写于
4月 03, 2014
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
gfs2: switch to ->write_iter()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
edaf4369
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
10 deletion
+8
-10
fs/gfs2/file.c
fs/gfs2/file.c
+8
-10
未找到文件。
fs/gfs2/file.c
浏览文件 @
da56e45b
...
...
@@ -684,7 +684,7 @@ static int gfs2_fsync(struct file *file, loff_t start, loff_t end,
}
/**
* gfs2_file_
aio_write
- Perform a write to a file
* gfs2_file_
write_iter
- Perform a write to a file
* @iocb: The io context
* @iov: The data to write
* @nr_segs: Number of @iov segments
...
...
@@ -697,11 +697,9 @@ static int gfs2_fsync(struct file *file, loff_t start, loff_t end,
*
*/
static
ssize_t
gfs2_file_aio_write
(
struct
kiocb
*
iocb
,
const
struct
iovec
*
iov
,
unsigned
long
nr_segs
,
loff_t
pos
)
static
ssize_t
gfs2_file_write_iter
(
struct
kiocb
*
iocb
,
struct
iov_iter
*
from
)
{
struct
file
*
file
=
iocb
->
ki_filp
;
size_t
writesize
=
iov_length
(
iov
,
nr_segs
);
struct
gfs2_inode
*
ip
=
GFS2_I
(
file_inode
(
file
));
int
ret
;
...
...
@@ -709,7 +707,7 @@ static ssize_t gfs2_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
if
(
ret
)
return
ret
;
gfs2_size_hint
(
file
,
pos
,
writesize
);
gfs2_size_hint
(
file
,
iocb
->
ki_pos
,
iov_iter_count
(
from
)
);
if
(
file
->
f_flags
&
O_APPEND
)
{
struct
gfs2_holder
gh
;
...
...
@@ -720,7 +718,7 @@ static ssize_t gfs2_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
gfs2_glock_dq_uninit
(
&
gh
);
}
return
generic_file_
aio_write
(
iocb
,
iov
,
nr_segs
,
pos
);
return
generic_file_
write_iter
(
iocb
,
from
);
}
static
int
fallocate_chunk
(
struct
inode
*
inode
,
loff_t
offset
,
loff_t
len
,
...
...
@@ -1060,8 +1058,8 @@ const struct file_operations gfs2_file_fops = {
.
llseek
=
gfs2_llseek
,
.
read
=
new_sync_read
,
.
read_iter
=
generic_file_read_iter
,
.
write
=
do
_sync_write
,
.
aio_write
=
gfs2_file_aio_write
,
.
write
=
new
_sync_write
,
.
write_iter
=
gfs2_file_write_iter
,
.
unlocked_ioctl
=
gfs2_ioctl
,
.
mmap
=
gfs2_mmap
,
.
open
=
gfs2_open
,
...
...
@@ -1092,8 +1090,8 @@ const struct file_operations gfs2_file_fops_nolock = {
.
llseek
=
gfs2_llseek
,
.
read
=
new_sync_read
,
.
read_iter
=
generic_file_read_iter
,
.
write
=
do
_sync_write
,
.
aio_write
=
gfs2_file_aio_write
,
.
write
=
new
_sync_write
,
.
write_iter
=
gfs2_file_write_iter
,
.
unlocked_ioctl
=
gfs2_ioctl
,
.
mmap
=
gfs2_mmap
,
.
open
=
gfs2_open
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录