Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
a67f797d
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看板
提交
a67f797d
编写于
10月 31, 2014
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ncpfs: use file_inode()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
b583043e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
15 deletion
+9
-15
fs/ncpfs/dir.c
fs/ncpfs/dir.c
+2
-4
fs/ncpfs/file.c
fs/ncpfs/file.c
+6
-8
fs/ncpfs/mmap.c
fs/ncpfs/mmap.c
+1
-3
未找到文件。
fs/ncpfs/dir.c
浏览文件 @
a67f797d
...
...
@@ -685,8 +685,7 @@ static void
ncp_read_volume_list
(
struct
file
*
file
,
struct
dir_context
*
ctx
,
struct
ncp_cache_control
*
ctl
)
{
struct
dentry
*
dentry
=
file
->
f_path
.
dentry
;
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
inode
*
inode
=
file_inode
(
file
);
struct
ncp_server
*
server
=
NCP_SERVER
(
inode
);
struct
ncp_volume_info
info
;
struct
ncp_entry_info
entry
;
...
...
@@ -721,8 +720,7 @@ static void
ncp_do_readdir
(
struct
file
*
file
,
struct
dir_context
*
ctx
,
struct
ncp_cache_control
*
ctl
)
{
struct
dentry
*
dentry
=
file
->
f_path
.
dentry
;
struct
inode
*
dir
=
dentry
->
d_inode
;
struct
inode
*
dir
=
file_inode
(
file
);
struct
ncp_server
*
server
=
NCP_SERVER
(
dir
);
struct
nw_search_sequence
seq
;
struct
ncp_entry_info
entry
;
...
...
fs/ncpfs/file.c
浏览文件 @
a67f797d
...
...
@@ -100,8 +100,7 @@ int ncp_make_open(struct inode *inode, int right)
static
ssize_t
ncp_file_read
(
struct
file
*
file
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
struct
dentry
*
dentry
=
file
->
f_path
.
dentry
;
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
inode
*
inode
=
file_inode
(
file
);
size_t
already_read
=
0
;
off_t
pos
;
size_t
bufsize
;
...
...
@@ -109,7 +108,7 @@ ncp_file_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
void
*
freepage
;
size_t
freelen
;
ncp_dbg
(
1
,
"enter %p
d2
\n
"
,
dentry
);
ncp_dbg
(
1
,
"enter %p
D2
\n
"
,
file
);
pos
=
*
ppos
;
...
...
@@ -167,7 +166,7 @@ ncp_file_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
file_accessed
(
file
);
ncp_dbg
(
1
,
"exit %p
d2
\n
"
,
dentry
);
ncp_dbg
(
1
,
"exit %p
D2
\n
"
,
file
);
outrel:
ncp_inode_close
(
inode
);
return
already_read
?
already_read
:
error
;
...
...
@@ -176,15 +175,14 @@ ncp_file_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
static
ssize_t
ncp_file_write
(
struct
file
*
file
,
const
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
struct
dentry
*
dentry
=
file
->
f_path
.
dentry
;
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
inode
*
inode
=
file_inode
(
file
);
size_t
already_written
=
0
;
off_t
pos
;
size_t
bufsize
;
int
errno
;
void
*
bouncebuffer
;
ncp_dbg
(
1
,
"enter %p
d2
\n
"
,
dentry
);
ncp_dbg
(
1
,
"enter %p
D2
\n
"
,
file
);
if
((
ssize_t
)
count
<
0
)
return
-
EINVAL
;
pos
=
*
ppos
;
...
...
@@ -263,7 +261,7 @@ ncp_file_write(struct file *file, const char __user *buf, size_t count, loff_t *
i_size_write
(
inode
,
pos
);
mutex_unlock
(
&
inode
->
i_mutex
);
}
ncp_dbg
(
1
,
"exit %p
d2
\n
"
,
dentry
);
ncp_dbg
(
1
,
"exit %p
D2
\n
"
,
file
);
outrel:
ncp_inode_close
(
inode
);
return
already_written
?
already_written
:
errno
;
...
...
fs/ncpfs/mmap.c
浏览文件 @
a67f797d
...
...
@@ -30,9 +30,7 @@
static
int
ncp_file_mmap_fault
(
struct
vm_area_struct
*
area
,
struct
vm_fault
*
vmf
)
{
struct
file
*
file
=
area
->
vm_file
;
struct
dentry
*
dentry
=
file
->
f_path
.
dentry
;
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
inode
*
inode
=
file_inode
(
area
->
vm_file
);
char
*
pg_addr
;
unsigned
int
already_read
;
unsigned
int
count
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录