Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
a1da9e8a
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看板
提交
a1da9e8a
编写于
7月 26, 2010
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
switch logfs to ->mount()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
e5a0726a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
23 addition
and
27 deletion
+23
-27
fs/logfs/logfs.h
fs/logfs/logfs.h
+0
-3
fs/logfs/super.c
fs/logfs/super.c
+23
-24
未找到文件。
fs/logfs/logfs.h
浏览文件 @
a1da9e8a
...
...
@@ -620,9 +620,6 @@ void emergency_read_end(struct page *page);
void
logfs_crash_dump
(
struct
super_block
*
sb
);
void
*
memchr_inv
(
const
void
*
s
,
int
c
,
size_t
n
);
int
logfs_statfs
(
struct
dentry
*
dentry
,
struct
kstatfs
*
stats
);
int
logfs_get_sb_device
(
struct
logfs_super
*
s
,
struct
file_system_type
*
type
,
int
flags
,
struct
vfsmount
*
mnt
);
int
logfs_check_ds
(
struct
logfs_disk_super
*
ds
);
int
logfs_write_sb
(
struct
super_block
*
sb
);
...
...
fs/logfs/super.c
浏览文件 @
a1da9e8a
...
...
@@ -325,7 +325,7 @@ static int logfs_make_writeable(struct super_block *sb)
return
0
;
}
static
int
logfs_get_sb_final
(
struct
super_block
*
sb
,
struct
vfsmount
*
mnt
)
static
int
logfs_get_sb_final
(
struct
super_block
*
sb
)
{
struct
logfs_super
*
super
=
logfs_super
(
sb
);
struct
inode
*
rootdir
;
...
...
@@ -356,7 +356,6 @@ static int logfs_get_sb_final(struct super_block *sb, struct vfsmount *mnt)
}
log_super
(
"LogFS: Finished mounting
\n
"
);
simple_set_mnt
(
mnt
,
sb
);
return
0
;
fail:
...
...
@@ -536,9 +535,8 @@ static void logfs_kill_sb(struct super_block *sb)
log_super
(
"LogFS: Finished unmounting
\n
"
);
}
int
logfs_get_sb_device
(
struct
logfs_super
*
super
,
struct
file_system_type
*
type
,
int
flags
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
logfs_get_sb_device
(
struct
logfs_super
*
super
,
struct
file_system_type
*
type
,
int
flags
)
{
struct
super_block
*
sb
;
int
err
=
-
ENOMEM
;
...
...
@@ -548,14 +546,17 @@ int logfs_get_sb_device(struct logfs_super *super,
err
=
-
EINVAL
;
sb
=
sget
(
type
,
logfs_sb_test
,
logfs_sb_set
,
super
);
if
(
IS_ERR
(
sb
))
goto
err0
;
if
(
IS_ERR
(
sb
))
{
super
->
s_devops
->
put_device
(
super
);
kfree
(
super
);
return
ERR_CAST
(
sb
);
}
if
(
sb
->
s_root
)
{
/* Device is already in use */
err
=
0
;
simple_set_mnt
(
mnt
,
sb
);
goto
err0
;
super
->
s_devops
->
put_device
(
super
)
;
kfree
(
super
);
return
dget
(
sb
->
s_root
)
;
}
/*
...
...
@@ -573,10 +574,12 @@ int logfs_get_sb_device(struct logfs_super *super,
goto
err1
;
sb
->
s_flags
|=
MS_ACTIVE
;
err
=
logfs_get_sb_final
(
sb
,
mnt
);
if
(
err
)
err
=
logfs_get_sb_final
(
sb
);
if
(
err
)
{
deactivate_locked_super
(
sb
);
return
err
;
return
ERR_PTR
(
err
);
}
return
dget
(
sb
->
s_root
);
err1:
/* no ->s_root, no ->put_super() */
...
...
@@ -584,15 +587,11 @@ int logfs_get_sb_device(struct logfs_super *super,
iput
(
super
->
s_segfile_inode
);
iput
(
super
->
s_mapping_inode
);
deactivate_locked_super
(
sb
);
return
err
;
err0:
super
->
s_devops
->
put_device
(
super
);
kfree
(
super
);
return
err
;
return
ERR_PTR
(
err
);
}
static
int
logfs_get_sb
(
struct
file_system_type
*
type
,
int
flags
,
const
char
*
devname
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
logfs_mount
(
struct
file_system_type
*
type
,
int
flags
,
const
char
*
devname
,
void
*
data
)
{
ulong
mtdnr
;
struct
logfs_super
*
super
;
...
...
@@ -600,7 +599,7 @@ static int logfs_get_sb(struct file_system_type *type, int flags,
super
=
kzalloc
(
sizeof
(
*
super
),
GFP_KERNEL
);
if
(
!
super
)
return
-
ENOMEM
;
return
ERR_PTR
(
-
ENOMEM
)
;
if
(
!
devname
)
err
=
logfs_get_sb_bdev
(
super
,
type
,
devname
);
...
...
@@ -617,16 +616,16 @@ static int logfs_get_sb(struct file_system_type *type, int flags,
if
(
err
)
{
kfree
(
super
);
return
err
;
return
ERR_PTR
(
err
)
;
}
return
logfs_get_sb_device
(
super
,
type
,
flags
,
mnt
);
return
logfs_get_sb_device
(
super
,
type
,
flags
);
}
static
struct
file_system_type
logfs_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"logfs"
,
.
get_sb
=
logfs_get_sb
,
.
mount
=
logfs_mount
,
.
kill_sb
=
logfs_kill_sb
,
.
fs_flags
=
FS_REQUIRES_DEV
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录