Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gsplhtlxg
clone-Linux
提交
d861c630
C
clone-Linux
项目概览
gsplhtlxg
/
clone-Linux
通知
2
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
clone-Linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d861c630
编写于
12月 08, 2011
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
vfs: switch ->show_devname() to struct dentry *
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
64132379
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
12 deletion
+13
-12
fs/nfs/super.c
fs/nfs/super.c
+3
-3
fs/proc_namespace.c
fs/proc_namespace.c
+9
-8
include/linux/fs.h
include/linux/fs.h
+1
-1
未找到文件。
fs/nfs/super.c
浏览文件 @
d861c630
...
...
@@ -263,7 +263,7 @@ static match_table_t nfs_local_lock_tokens = {
static
void
nfs_umount_begin
(
struct
super_block
*
);
static
int
nfs_statfs
(
struct
dentry
*
,
struct
kstatfs
*
);
static
int
nfs_show_options
(
struct
seq_file
*
,
struct
vfsmount
*
);
static
int
nfs_show_devname
(
struct
seq_file
*
,
struct
vfsmount
*
);
static
int
nfs_show_devname
(
struct
seq_file
*
,
struct
dentry
*
);
static
int
nfs_show_path
(
struct
seq_file
*
,
struct
vfsmount
*
);
static
int
nfs_show_stats
(
struct
seq_file
*
,
struct
dentry
*
);
static
struct
dentry
*
nfs_fs_mount
(
struct
file_system_type
*
,
...
...
@@ -760,14 +760,14 @@ static void show_pnfs(struct seq_file *m, struct nfs_server *server) {}
#endif
#endif
static
int
nfs_show_devname
(
struct
seq_file
*
m
,
struct
vfsmount
*
mn
t
)
static
int
nfs_show_devname
(
struct
seq_file
*
m
,
struct
dentry
*
roo
t
)
{
char
*
page
=
(
char
*
)
__get_free_page
(
GFP_KERNEL
);
char
*
devname
,
*
dummy
;
int
err
=
0
;
if
(
!
page
)
return
-
ENOMEM
;
devname
=
nfs_path
(
&
dummy
,
mnt
->
mnt_
root
,
page
,
PAGE_SIZE
);
devname
=
nfs_path
(
&
dummy
,
root
,
page
,
PAGE_SIZE
);
if
(
IS_ERR
(
devname
))
err
=
PTR_ERR
(
devname
);
else
...
...
fs/proc_namespace.c
浏览文件 @
d861c630
...
...
@@ -94,9 +94,10 @@ static int show_vfsmnt(struct seq_file *m, struct vfsmount *mnt)
struct
mount
*
r
=
real_mount
(
mnt
);
int
err
=
0
;
struct
path
mnt_path
=
{
.
dentry
=
mnt
->
mnt_root
,
.
mnt
=
mnt
};
struct
super_block
*
sb
=
mnt_path
.
dentry
->
d_sb
;
if
(
mnt
->
mnt_
sb
->
s_op
->
show_devname
)
{
err
=
mnt
->
mnt_sb
->
s_op
->
show_devname
(
m
,
mnt
);
if
(
sb
->
s_op
->
show_devname
)
{
err
=
sb
->
s_op
->
show_devname
(
m
,
mnt_path
.
dentry
);
if
(
err
)
goto
out
;
}
else
{
...
...
@@ -105,14 +106,14 @@ static int show_vfsmnt(struct seq_file *m, struct vfsmount *mnt)
seq_putc
(
m
,
' '
);
seq_path
(
m
,
&
mnt_path
,
"
\t\n\\
"
);
seq_putc
(
m
,
' '
);
show_type
(
m
,
mnt
->
mnt_
sb
);
show_type
(
m
,
sb
);
seq_puts
(
m
,
__mnt_is_readonly
(
mnt
)
?
" ro"
:
" rw"
);
err
=
show_sb_opts
(
m
,
mnt
->
mnt_
sb
);
err
=
show_sb_opts
(
m
,
sb
);
if
(
err
)
goto
out
;
show_mnt_opts
(
m
,
mnt
);
if
(
mnt
->
mnt_
sb
->
s_op
->
show_options
)
err
=
mnt
->
mnt_
sb
->
s_op
->
show_options
(
m
,
mnt
);
if
(
sb
->
s_op
->
show_options
)
err
=
sb
->
s_op
->
show_options
(
m
,
mnt
);
seq_puts
(
m
,
" 0 0
\n
"
);
out:
return
err
;
...
...
@@ -163,7 +164,7 @@ static int show_mountinfo(struct seq_file *m, struct vfsmount *mnt)
show_type
(
m
,
sb
);
seq_putc
(
m
,
' '
);
if
(
sb
->
s_op
->
show_devname
)
err
=
sb
->
s_op
->
show_devname
(
m
,
mnt
);
err
=
sb
->
s_op
->
show_devname
(
m
,
mnt
->
mnt_root
);
else
mangle
(
m
,
r
->
mnt_devname
?
r
->
mnt_devname
:
"none"
);
if
(
err
)
...
...
@@ -189,7 +190,7 @@ static int show_vfsstat(struct seq_file *m, struct vfsmount *mnt)
/* device */
if
(
sb
->
s_op
->
show_devname
)
{
seq_puts
(
m
,
"device "
);
err
=
sb
->
s_op
->
show_devname
(
m
,
mnt
);
err
=
sb
->
s_op
->
show_devname
(
m
,
mnt
_path
.
dentry
);
}
else
{
if
(
r
->
mnt_devname
)
{
seq_puts
(
m
,
"device "
);
...
...
include/linux/fs.h
浏览文件 @
d861c630
...
...
@@ -1673,7 +1673,7 @@ struct super_operations {
void
(
*
umount_begin
)
(
struct
super_block
*
);
int
(
*
show_options
)(
struct
seq_file
*
,
struct
vfsmount
*
);
int
(
*
show_devname
)(
struct
seq_file
*
,
struct
vfsmount
*
);
int
(
*
show_devname
)(
struct
seq_file
*
,
struct
dentry
*
);
int
(
*
show_path
)(
struct
seq_file
*
,
struct
vfsmount
*
);
int
(
*
show_stats
)(
struct
seq_file
*
,
struct
dentry
*
);
#ifdef CONFIG_QUOTA
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录