Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
f4947fbc
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看板
提交
f4947fbc
编写于
1月 10, 2012
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
coda: switch coda_cnode_make() to sane API as well, clean coda_lookup()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
0b2c4e39
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
27 addition
and
31 deletion
+27
-31
fs/coda/cnode.c
fs/coda/cnode.c
+7
-10
fs/coda/coda_fs_i.h
fs/coda/coda_fs_i.h
+1
-1
fs/coda/dir.c
fs/coda/dir.c
+13
-16
fs/coda/inode.c
fs/coda/inode.c
+6
-4
未找到文件。
fs/coda/cnode.c
浏览文件 @
f4947fbc
...
...
@@ -88,24 +88,21 @@ struct inode * coda_iget(struct super_block * sb, struct CodaFid * fid,
- link the two up if this is needed
- fill in the attributes
*/
int
coda_cnode_make
(
struct
inode
**
inode
,
struct
CodaFid
*
fid
,
struct
super_block
*
sb
)
struct
inode
*
coda_cnode_make
(
struct
CodaFid
*
fid
,
struct
super_block
*
sb
)
{
struct
coda_vattr
attr
;
struct
inode
*
inode
;
int
error
;
/* We get inode numbers from Venus -- see venus source */
error
=
venus_getattr
(
sb
,
fid
,
&
attr
);
if
(
error
)
{
*
inode
=
NULL
;
return
error
;
}
if
(
error
)
return
ERR_PTR
(
error
);
*
inode
=
coda_iget
(
sb
,
fid
,
&
attr
);
if
(
IS_ERR
(
*
inode
)
)
{
inode
=
coda_iget
(
sb
,
fid
,
&
attr
);
if
(
IS_ERR
(
inode
))
printk
(
"coda_cnode_make: coda_iget failed
\n
"
);
return
PTR_ERR
(
*
inode
);
}
return
0
;
return
inode
;
}
...
...
fs/coda/coda_fs_i.h
浏览文件 @
f4947fbc
...
...
@@ -49,7 +49,7 @@ struct coda_file_info {
#define C_DYING 0x4
/* from venus (which died) */
#define C_PURGE 0x8
int
coda_cnode_make
(
struct
inode
**
,
struct
CodaFid
*
,
struct
super_block
*
);
struct
inode
*
coda_cnode_make
(
struct
CodaFid
*
,
struct
super_block
*
);
struct
inode
*
coda_iget
(
struct
super_block
*
sb
,
struct
CodaFid
*
fid
,
struct
coda_vattr
*
attr
);
struct
inode
*
coda_cnode_makectl
(
struct
super_block
*
sb
);
struct
inode
*
coda_fid_to_inode
(
struct
CodaFid
*
fid
,
struct
super_block
*
sb
);
...
...
fs/coda/dir.c
浏览文件 @
f4947fbc
...
...
@@ -96,12 +96,11 @@ const struct file_operations coda_dir_operations = {
/* access routines: lookup, readlink, permission */
static
struct
dentry
*
coda_lookup
(
struct
inode
*
dir
,
struct
dentry
*
entry
,
struct
nameidata
*
nd
)
{
struct
inode
*
inode
=
NULL
;
struct
CodaFid
resfid
=
{
{
0
,
}
};
int
type
=
0
;
int
error
=
0
;
struct
super_block
*
sb
=
dir
->
i_sb
;
const
char
*
name
=
entry
->
d_name
.
name
;
size_t
length
=
entry
->
d_name
.
len
;
struct
inode
*
inode
;
int
type
=
0
;
if
(
length
>
CODA_MAXNAMLEN
)
{
printk
(
KERN_ERR
"name too long: lookup, %s (%*s)
\n
"
,
...
...
@@ -111,23 +110,21 @@ static struct dentry *coda_lookup(struct inode *dir, struct dentry *entry, struc
/* control object, create inode on the fly */
if
(
coda_isroot
(
dir
)
&&
coda_iscontrol
(
name
,
length
))
{
inode
=
coda_cnode_makectl
(
dir
->
i_
sb
);
inode
=
coda_cnode_makectl
(
sb
);
type
=
CODA_NOCACHE
;
goto
exit
;
}
else
{
struct
CodaFid
fid
=
{
{
0
,
}
};
int
error
=
venus_lookup
(
sb
,
coda_i2f
(
dir
),
name
,
length
,
&
type
,
&
fid
);
inode
=
!
error
?
coda_cnode_make
(
&
fid
,
sb
)
:
ERR_PTR
(
error
);
}
error
=
venus_lookup
(
dir
->
i_sb
,
coda_i2f
(
dir
),
name
,
length
,
&
type
,
&
resfid
);
if
(
!
error
)
error
=
coda_cnode_make
(
&
inode
,
&
resfid
,
dir
->
i_sb
);
if
(
error
&&
error
!=
-
ENOENT
)
return
ERR_PTR
(
error
);
exit:
if
(
inode
&&
!
IS_ERR
(
inode
)
&&
(
type
&
CODA_NOCACHE
))
if
(
!
IS_ERR
(
inode
)
&&
(
type
&
CODA_NOCACHE
))
coda_flag_inode
(
inode
,
C_VATTR
|
C_PURGE
);
if
(
inode
==
ERR_PTR
(
-
ENOENT
))
inode
=
NULL
;
return
d_splice_alias
(
inode
,
entry
);
}
...
...
fs/coda/inode.c
浏览文件 @
f4947fbc
...
...
@@ -204,10 +204,12 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
printk
(
"coda_read_super: rootfid is %s
\n
"
,
coda_f2s
(
&
fid
));
/* make root inode */
error
=
coda_cnode_make
(
&
root
,
&
fid
,
sb
);
if
(
error
||
!
root
)
{
printk
(
"Failure of coda_cnode_make for root: error %d
\n
"
,
error
);
goto
error
;
root
=
coda_cnode_make
(
&
fid
,
sb
);
if
(
IS_ERR
(
root
))
{
error
=
PTR_ERR
(
root
);
printk
(
"Failure of coda_cnode_make for root: error %d
\n
"
,
error
);
root
=
NULL
;
goto
error
;
}
printk
(
"coda_read_super: rootinode is %ld dev %s
\n
"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录