Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
78c3e473
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 3 年多
通知
13
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
78c3e473
编写于
1月 27, 2013
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xenfs: switch to pure simple_fill_super()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
740da42e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
55 deletion
+11
-55
drivers/xen/xenfs/super.c
drivers/xen/xenfs/super.c
+11
-55
未找到文件。
drivers/xen/xenfs/super.c
浏览文件 @
78c3e473
...
@@ -24,47 +24,6 @@
...
@@ -24,47 +24,6 @@
MODULE_DESCRIPTION
(
"Xen filesystem"
);
MODULE_DESCRIPTION
(
"Xen filesystem"
);
MODULE_LICENSE
(
"GPL"
);
MODULE_LICENSE
(
"GPL"
);
static
struct
inode
*
xenfs_make_inode
(
struct
super_block
*
sb
,
int
mode
)
{
struct
inode
*
ret
=
new_inode
(
sb
);
if
(
ret
)
{
ret
->
i_mode
=
mode
;
ret
->
i_uid
=
GLOBAL_ROOT_UID
;
ret
->
i_gid
=
GLOBAL_ROOT_GID
;
ret
->
i_blocks
=
0
;
ret
->
i_atime
=
ret
->
i_mtime
=
ret
->
i_ctime
=
CURRENT_TIME
;
}
return
ret
;
}
static
struct
dentry
*
xenfs_create_file
(
struct
super_block
*
sb
,
struct
dentry
*
parent
,
const
char
*
name
,
const
struct
file_operations
*
fops
,
void
*
data
,
int
mode
)
{
struct
dentry
*
dentry
;
struct
inode
*
inode
;
dentry
=
d_alloc_name
(
parent
,
name
);
if
(
!
dentry
)
return
NULL
;
inode
=
xenfs_make_inode
(
sb
,
S_IFREG
|
mode
);
if
(
!
inode
)
{
dput
(
dentry
);
return
NULL
;
}
inode
->
i_fop
=
fops
;
inode
->
i_private
=
data
;
d_add
(
dentry
,
inode
);
return
dentry
;
}
static
ssize_t
capabilities_read
(
struct
file
*
file
,
char
__user
*
buf
,
static
ssize_t
capabilities_read
(
struct
file
*
file
,
char
__user
*
buf
,
size_t
size
,
loff_t
*
off
)
size_t
size
,
loff_t
*
off
)
{
{
...
@@ -84,26 +43,23 @@ static const struct file_operations capabilities_file_ops = {
...
@@ -84,26 +43,23 @@ static const struct file_operations capabilities_file_ops = {
static
int
xenfs_fill_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
static
int
xenfs_fill_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
{
{
static
struct
tree_descr
xenfs_files
[]
=
{
static
struct
tree_descr
xenfs_files
[]
=
{
[
1
]
=
{},
[
2
]
=
{
"xenbus"
,
&
xen_xenbus_fops
,
S_IRUSR
|
S_IWUSR
},
{
"xenbus"
,
&
xen_xenbus_fops
,
S_IRUSR
|
S_IWUSR
},
{
"capabilities"
,
&
capabilities_file_ops
,
S_IRUGO
},
{
"capabilities"
,
&
capabilities_file_ops
,
S_IRUGO
},
{
"privcmd"
,
&
xen_privcmd_fops
,
S_IRUSR
|
S_IWUSR
},
{
"privcmd"
,
&
xen_privcmd_fops
,
S_IRUSR
|
S_IWUSR
},
{
""
},
{
""
},
};
};
int
rc
;
rc
=
simple_fill_super
(
sb
,
XENFS_SUPER_MAGIC
,
xenfs_files
);
static
struct
tree_descr
xenfs_init_files
[]
=
{
if
(
rc
<
0
)
[
2
]
=
{
"xenbus"
,
&
xen_xenbus_fops
,
S_IRUSR
|
S_IWUSR
},
return
rc
;
{
"capabilities"
,
&
capabilities_file_ops
,
S_IRUGO
},
{
"privcmd"
,
&
xen_privcmd_fops
,
S_IRUSR
|
S_IWUSR
},
if
(
xen_initial_domain
())
{
{
"xsd_kva"
,
&
xsd_kva_file_ops
,
S_IRUSR
|
S_IWUSR
},
xenfs_create_file
(
sb
,
sb
->
s_root
,
"xsd_kva"
,
{
"xsd_port"
,
&
xsd_port_file_ops
,
S_IRUSR
|
S_IWUSR
},
&
xsd_kva_file_ops
,
NULL
,
S_IRUSR
|
S_IWUSR
);
{
""
},
xenfs_create_file
(
sb
,
sb
->
s_root
,
"xsd_port"
,
};
&
xsd_port_file_ops
,
NULL
,
S_IRUSR
|
S_IWUSR
);
}
return
rc
;
return
simple_fill_super
(
sb
,
XENFS_SUPER_MAGIC
,
xen_initial_domain
()
?
xenfs_init_files
:
xenfs_files
);
}
}
static
struct
dentry
*
xenfs_mount
(
struct
file_system_type
*
fs_type
,
static
struct
dentry
*
xenfs_mount
(
struct
file_system_type
*
fs_type
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录