Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
03d95eb2
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看板
提交
03d95eb2
编写于
3月 20, 2013
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lift sb_start_write() out of ->write()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
72ec3516
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
26 addition
and
13 deletion
+26
-13
drivers/block/loop.c
drivers/block/loop.c
+2
-0
fs/cachefiles/rdwr.c
fs/cachefiles/rdwr.c
+2
-0
fs/coda/file.c
fs/coda/file.c
+2
-0
fs/coredump.c
fs/coredump.c
+2
-0
fs/read_write.c
fs/read_write.c
+14
-10
fs/splice.c
fs/splice.c
+2
-0
kernel/acct.c
kernel/acct.c
+2
-0
mm/filemap_xip.c
mm/filemap_xip.c
+0
-3
未找到文件。
drivers/block/loop.c
浏览文件 @
03d95eb2
...
...
@@ -230,9 +230,11 @@ static int __do_lo_send_write(struct file *file,
ssize_t
bw
;
mm_segment_t
old_fs
=
get_fs
();
file_start_write
(
file
);
set_fs
(
get_ds
());
bw
=
file
->
f_op
->
write
(
file
,
buf
,
len
,
&
pos
);
set_fs
(
old_fs
);
file_end_write
(
file
);
if
(
likely
(
bw
==
len
))
return
0
;
printk
(
KERN_ERR
"loop: Write error at byte offset %llu, length %i.
\n
"
,
...
...
fs/cachefiles/rdwr.c
浏览文件 @
03d95eb2
...
...
@@ -962,12 +962,14 @@ int cachefiles_write_page(struct fscache_storage *op, struct page *page)
}
data
=
kmap
(
page
);
file_start_write
(
file
);
old_fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
ret
=
file
->
f_op
->
write
(
file
,
(
const
void
__user
*
)
data
,
len
,
&
pos
);
set_fs
(
old_fs
);
kunmap
(
page
);
file_end_write
(
file
);
if
(
ret
!=
len
)
ret
=
-
EIO
;
}
...
...
fs/coda/file.c
浏览文件 @
03d95eb2
...
...
@@ -79,6 +79,7 @@ coda_file_write(struct file *coda_file, const char __user *buf, size_t count, lo
return
-
EINVAL
;
host_inode
=
file_inode
(
host_file
);
file_start_write
(
host_file
);
mutex_lock
(
&
coda_inode
->
i_mutex
);
ret
=
host_file
->
f_op
->
write
(
host_file
,
buf
,
count
,
ppos
);
...
...
@@ -87,6 +88,7 @@ coda_file_write(struct file *coda_file, const char __user *buf, size_t count, lo
coda_inode
->
i_blocks
=
(
coda_inode
->
i_size
+
511
)
>>
9
;
coda_inode
->
i_mtime
=
coda_inode
->
i_ctime
=
CURRENT_TIME_SEC
;
mutex_unlock
(
&
coda_inode
->
i_mutex
);
file_end_write
(
host_file
);
return
ret
;
}
...
...
fs/coredump.c
浏览文件 @
03d95eb2
...
...
@@ -629,9 +629,11 @@ void do_coredump(siginfo_t *siginfo)
goto
close_fail
;
if
(
displaced
)
put_files_struct
(
displaced
);
file_start_write
(
cprm
.
file
);
retval
=
binfmt
->
core_dump
(
&
cprm
);
if
(
retval
)
current
->
signal
->
group_exit_code
|=
0x80
;
file_end_write
(
cprm
.
file
);
if
(
ispipe
&&
core_pipe_limit
)
wait_for_dump_helpers
(
cprm
.
file
);
...
...
fs/read_write.c
浏览文件 @
03d95eb2
...
...
@@ -398,7 +398,6 @@ ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, lof
struct
kiocb
kiocb
;
ssize_t
ret
;
file_start_write
(
filp
);
init_sync_kiocb
(
&
kiocb
,
filp
);
kiocb
.
ki_pos
=
*
ppos
;
kiocb
.
ki_left
=
len
;
...
...
@@ -414,7 +413,6 @@ ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, lof
if
(
-
EIOCBQUEUED
==
ret
)
ret
=
wait_on_sync_kiocb
(
&
kiocb
);
*
ppos
=
kiocb
.
ki_pos
;
file_end_write
(
filp
);
return
ret
;
}
...
...
@@ -458,6 +456,7 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_
ret
=
rw_verify_area
(
WRITE
,
file
,
pos
,
count
);
if
(
ret
>=
0
)
{
count
=
ret
;
file_start_write
(
file
);
if
(
file
->
f_op
->
write
)
ret
=
file
->
f_op
->
write
(
file
,
buf
,
count
,
pos
);
else
...
...
@@ -467,6 +466,7 @@ ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_
add_wchar
(
current
,
ret
);
}
inc_syscw
(
current
);
file_end_write
(
file
);
}
return
ret
;
...
...
@@ -758,16 +758,18 @@ static ssize_t do_readv_writev(int type, struct file *file,
}
else
{
fn
=
(
io_fn_t
)
file
->
f_op
->
write
;
fnv
=
file
->
f_op
->
aio_write
;
file_start_write
(
file
);
}
if
(
fnv
)
{
file_start_write
(
file
);
if
(
fnv
)
ret
=
do_sync_readv_writev
(
file
,
iov
,
nr_segs
,
tot_len
,
pos
,
fnv
);
file_end_write
(
file
);
}
else
else
ret
=
do_loop_readv_writev
(
file
,
iov
,
nr_segs
,
pos
,
fn
);
if
(
type
!=
READ
)
file_end_write
(
file
);
out:
if
(
iov
!=
iovstack
)
kfree
(
iov
);
...
...
@@ -936,16 +938,18 @@ static ssize_t compat_do_readv_writev(int type, struct file *file,
}
else
{
fn
=
(
io_fn_t
)
file
->
f_op
->
write
;
fnv
=
file
->
f_op
->
aio_write
;
file_start_write
(
file
);
}
if
(
fnv
)
{
file_start_write
(
file
);
if
(
fnv
)
ret
=
do_sync_readv_writev
(
file
,
iov
,
nr_segs
,
tot_len
,
pos
,
fnv
);
file_end_write
(
file
);
}
else
else
ret
=
do_loop_readv_writev
(
file
,
iov
,
nr_segs
,
pos
,
fn
);
if
(
type
!=
READ
)
file_end_write
(
file
);
out:
if
(
iov
!=
iovstack
)
kfree
(
iov
);
...
...
fs/splice.c
浏览文件 @
03d95eb2
...
...
@@ -1052,7 +1052,9 @@ static int write_pipe_buf(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
loff_t
tmp
=
sd
->
pos
;
data
=
buf
->
ops
->
map
(
pipe
,
buf
,
0
);
file_start_write
(
sd
->
u
.
file
);
ret
=
__kernel_write
(
sd
->
u
.
file
,
data
+
buf
->
offset
,
sd
->
len
,
&
tmp
);
file_end_write
(
sd
->
u
.
file
);
buf
->
ops
->
unmap
(
pipe
,
buf
,
data
);
return
ret
;
...
...
kernel/acct.c
浏览文件 @
03d95eb2
...
...
@@ -543,6 +543,7 @@ static void do_acct_process(struct bsd_acct_struct *acct,
* Kernel segment override to datasegment and write it
* to the accounting file.
*/
file_start_write
(
file
);
fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
/*
...
...
@@ -554,6 +555,7 @@ static void do_acct_process(struct bsd_acct_struct *acct,
sizeof
(
acct_t
),
&
file
->
f_pos
);
current
->
signal
->
rlim
[
RLIMIT_FSIZE
].
rlim_cur
=
flim
;
set_fs
(
fs
);
file_end_write
(
file
);
out:
revert_creds
(
orig_cred
);
}
...
...
mm/filemap_xip.c
浏览文件 @
03d95eb2
...
...
@@ -404,8 +404,6 @@ xip_file_write(struct file *filp, const char __user *buf, size_t len,
loff_t
pos
;
ssize_t
ret
;
sb_start_write
(
inode
->
i_sb
);
mutex_lock
(
&
inode
->
i_mutex
);
if
(
!
access_ok
(
VERIFY_READ
,
buf
,
len
))
{
...
...
@@ -439,7 +437,6 @@ xip_file_write(struct file *filp, const char __user *buf, size_t len,
current
->
backing_dev_info
=
NULL
;
out_up:
mutex_unlock
(
&
inode
->
i_mutex
);
sb_end_write
(
inode
->
i_sb
);
return
ret
;
}
EXPORT_SYMBOL_GPL
(
xip_file_write
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录