Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
37c20f16
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
37c20f16
编写于
4月 02, 2014
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fuse_file_aio_read(): convert to ->read_iter()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
3cd9ad5a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
5 addition
and
6 deletion
+5
-6
fs/fuse/file.c
fs/fuse/file.c
+5
-6
未找到文件。
fs/fuse/file.c
浏览文件 @
37c20f16
...
@@ -933,8 +933,7 @@ static int fuse_readpages(struct file *file, struct address_space *mapping,
...
@@ -933,8 +933,7 @@ static int fuse_readpages(struct file *file, struct address_space *mapping,
return
err
;
return
err
;
}
}
static
ssize_t
fuse_file_aio_read
(
struct
kiocb
*
iocb
,
const
struct
iovec
*
iov
,
static
ssize_t
fuse_file_read_iter
(
struct
kiocb
*
iocb
,
struct
iov_iter
*
to
)
unsigned
long
nr_segs
,
loff_t
pos
)
{
{
struct
inode
*
inode
=
iocb
->
ki_filp
->
f_mapping
->
host
;
struct
inode
*
inode
=
iocb
->
ki_filp
->
f_mapping
->
host
;
struct
fuse_conn
*
fc
=
get_fuse_conn
(
inode
);
struct
fuse_conn
*
fc
=
get_fuse_conn
(
inode
);
...
@@ -945,14 +944,14 @@ static ssize_t fuse_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
...
@@ -945,14 +944,14 @@ static ssize_t fuse_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
* i_size is up to date).
* i_size is up to date).
*/
*/
if
(
fc
->
auto_inval_data
||
if
(
fc
->
auto_inval_data
||
(
pos
+
iov_length
(
iov
,
nr_segs
)
>
i_size_read
(
inode
)))
{
(
iocb
->
ki_pos
+
iov_iter_count
(
to
)
>
i_size_read
(
inode
)))
{
int
err
;
int
err
;
err
=
fuse_update_attributes
(
inode
,
NULL
,
iocb
->
ki_filp
,
NULL
);
err
=
fuse_update_attributes
(
inode
,
NULL
,
iocb
->
ki_filp
,
NULL
);
if
(
err
)
if
(
err
)
return
err
;
return
err
;
}
}
return
generic_file_
aio_read
(
iocb
,
iov
,
nr_segs
,
pos
);
return
generic_file_
read_iter
(
iocb
,
to
);
}
}
static
void
fuse_write_fill
(
struct
fuse_req
*
req
,
struct
fuse_file
*
ff
,
static
void
fuse_write_fill
(
struct
fuse_req
*
req
,
struct
fuse_file
*
ff
,
...
@@ -3038,8 +3037,8 @@ static long fuse_file_fallocate(struct file *file, int mode, loff_t offset,
...
@@ -3038,8 +3037,8 @@ static long fuse_file_fallocate(struct file *file, int mode, loff_t offset,
static
const
struct
file_operations
fuse_file_operations
=
{
static
const
struct
file_operations
fuse_file_operations
=
{
.
llseek
=
fuse_file_llseek
,
.
llseek
=
fuse_file_llseek
,
.
read
=
do
_sync_read
,
.
read
=
new
_sync_read
,
.
aio_read
=
fuse_file_aio_read
,
.
read_iter
=
fuse_file_read_iter
,
.
write
=
do_sync_write
,
.
write
=
do_sync_write
,
.
aio_write
=
fuse_file_aio_write
,
.
aio_write
=
fuse_file_aio_write
,
.
mmap
=
fuse_file_mmap
,
.
mmap
=
fuse_file_mmap
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录