Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
f5674c31
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看板
提交
f5674c31
编写于
4月 03, 2014
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ubifs: switch to ->write_iter()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
a8f3550c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
7 addition
and
12 deletion
+7
-12
fs/ubifs/file.c
fs/ubifs/file.c
+7
-12
未找到文件。
fs/ubifs/file.c
浏览文件 @
f5674c31
...
...
@@ -1363,17 +1363,17 @@ static inline int mctime_update_needed(const struct inode *inode,
/**
* update_ctime - update mtime and ctime of an inode.
* @c: UBIFS file-system description object
* @inode: inode to update
*
* This function updates mtime and ctime of the inode if it is not equivalent to
* current time. Returns zero in case of success and a negative error code in
* case of failure.
*/
static
int
update_mctime
(
struct
ubifs_info
*
c
,
struct
inode
*
inode
)
static
int
update_mctime
(
struct
inode
*
inode
)
{
struct
timespec
now
=
ubifs_current_time
(
inode
);
struct
ubifs_inode
*
ui
=
ubifs_inode
(
inode
);
struct
ubifs_info
*
c
=
inode
->
i_sb
->
s_fs_info
;
if
(
mctime_update_needed
(
inode
,
&
now
))
{
int
err
,
release
;
...
...
@@ -1396,18 +1396,13 @@ static int update_mctime(struct ubifs_info *c, struct inode *inode)
return
0
;
}
static
ssize_t
ubifs_aio_write
(
struct
kiocb
*
iocb
,
const
struct
iovec
*
iov
,
unsigned
long
nr_segs
,
loff_t
pos
)
static
ssize_t
ubifs_write_iter
(
struct
kiocb
*
iocb
,
struct
iov_iter
*
from
)
{
int
err
;
struct
inode
*
inode
=
iocb
->
ki_filp
->
f_mapping
->
host
;
struct
ubifs_info
*
c
=
inode
->
i_sb
->
s_fs_info
;
err
=
update_mctime
(
c
,
inode
);
int
err
=
update_mctime
(
file_inode
(
iocb
->
ki_filp
));
if
(
err
)
return
err
;
return
generic_file_
aio_write
(
iocb
,
iov
,
nr_segs
,
pos
);
return
generic_file_
write_iter
(
iocb
,
from
);
}
static
int
ubifs_set_page_dirty
(
struct
page
*
page
)
...
...
@@ -1583,9 +1578,9 @@ const struct inode_operations ubifs_symlink_inode_operations = {
const
struct
file_operations
ubifs_file_operations
=
{
.
llseek
=
generic_file_llseek
,
.
read
=
new_sync_read
,
.
write
=
do
_sync_write
,
.
write
=
new
_sync_write
,
.
read_iter
=
generic_file_read_iter
,
.
aio_write
=
ubifs_aio_write
,
.
write_iter
=
ubifs_write_iter
,
.
mmap
=
ubifs_file_mmap
,
.
fsync
=
ubifs_fsync
,
.
unlocked_ioctl
=
ubifs_ioctl
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录