Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
1456c0a8
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1456c0a8
编写于
4月 03, 2014
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
blkdev_aio_write() - turn into blkdev_write_iter()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
8174202b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
14 deletion
+9
-14
drivers/char/raw.c
drivers/char/raw.c
+2
-2
fs/block_dev.c
fs/block_dev.c
+6
-10
include/linux/fs.h
include/linux/fs.h
+1
-2
未找到文件。
drivers/char/raw.c
浏览文件 @
1456c0a8
...
...
@@ -286,8 +286,8 @@ static long raw_ctl_compat_ioctl(struct file *file, unsigned int cmd,
static
const
struct
file_operations
raw_fops
=
{
.
read
=
new_sync_read
,
.
read_iter
=
generic_file_read_iter
,
.
write
=
do
_sync_write
,
.
aio_write
=
blkdev_aio_write
,
.
write
=
new
_sync_write
,
.
write_iter
=
blkdev_write_iter
,
.
fsync
=
blkdev_fsync
,
.
open
=
raw_open
,
.
release
=
raw_release
,
...
...
fs/block_dev.c
浏览文件 @
1456c0a8
...
...
@@ -1509,28 +1509,24 @@ static long block_ioctl(struct file *file, unsigned cmd, unsigned long arg)
* Does not take i_mutex for the write and thus is not for general purpose
* use.
*/
ssize_t
blkdev_aio_write
(
struct
kiocb
*
iocb
,
const
struct
iovec
*
iov
,
unsigned
long
nr_segs
,
loff_t
pos
)
ssize_t
blkdev_write_iter
(
struct
kiocb
*
iocb
,
struct
iov_iter
*
from
)
{
struct
file
*
file
=
iocb
->
ki_filp
;
struct
blk_plug
plug
;
ssize_t
ret
;
BUG_ON
(
iocb
->
ki_pos
!=
pos
);
blk_start_plug
(
&
plug
);
ret
=
__generic_file_
aio_write
(
iocb
,
iov
,
nr_segs
);
ret
=
__generic_file_
write_iter
(
iocb
,
from
);
if
(
ret
>
0
)
{
ssize_t
err
;
err
=
generic_write_sync
(
file
,
pos
,
ret
);
err
=
generic_write_sync
(
file
,
iocb
->
ki_pos
-
ret
,
ret
);
if
(
err
<
0
)
ret
=
err
;
}
blk_finish_plug
(
&
plug
);
return
ret
;
}
EXPORT_SYMBOL_GPL
(
blkdev_
aio_write
);
EXPORT_SYMBOL_GPL
(
blkdev_
write_iter
);
static
ssize_t
blkdev_read_iter
(
struct
kiocb
*
iocb
,
struct
iov_iter
*
to
)
{
...
...
@@ -1577,9 +1573,9 @@ const struct file_operations def_blk_fops = {
.
release
=
blkdev_close
,
.
llseek
=
block_llseek
,
.
read
=
new_sync_read
,
.
write
=
do
_sync_write
,
.
write
=
new
_sync_write
,
.
read_iter
=
blkdev_read_iter
,
.
aio_write
=
blkdev_aio_write
,
.
write_iter
=
blkdev_write_iter
,
.
mmap
=
generic_file_mmap
,
.
fsync
=
blkdev_fsync
,
.
unlocked_ioctl
=
block_ioctl
,
...
...
include/linux/fs.h
浏览文件 @
1456c0a8
...
...
@@ -2425,8 +2425,7 @@ extern ssize_t new_sync_read(struct file *filp, char __user *buf, size_t len, lo
extern
ssize_t
new_sync_write
(
struct
file
*
filp
,
const
char
__user
*
buf
,
size_t
len
,
loff_t
*
ppos
);
/* fs/block_dev.c */
extern
ssize_t
blkdev_aio_write
(
struct
kiocb
*
iocb
,
const
struct
iovec
*
iov
,
unsigned
long
nr_segs
,
loff_t
pos
);
extern
ssize_t
blkdev_write_iter
(
struct
kiocb
*
iocb
,
struct
iov_iter
*
from
);
extern
int
blkdev_fsync
(
struct
file
*
filp
,
loff_t
start
,
loff_t
end
,
int
datasync
);
extern
void
block_sync_page
(
struct
page
*
page
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录