Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
52ba1621
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看板
提交
52ba1621
编写于
11月 25, 2011
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
vfs: move mnt_devname
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
1a4eeaf2
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
11 deletion
+11
-11
fs/mount.h
fs/mount.h
+2
-1
fs/namespace.c
fs/namespace.c
+9
-9
include/linux/mount.h
include/linux/mount.h
+0
-1
未找到文件。
fs/mount.h
浏览文件 @
52ba1621
...
...
@@ -19,7 +19,8 @@ struct mount {
#endif
struct
list_head
mnt_mounts
;
/* list of children, anchored here */
struct
list_head
mnt_child
;
/* and going through their mnt_child */
/* yet to be moved - up to mnt_devname */
/* yet to be moved - fsnotify ones go here */
const
char
*
mnt_devname
;
/* Name of device e.g. /dev/dsk/hda1 */
struct
list_head
mnt_list
;
struct
list_head
mnt_expire
;
/* link in fs-specific expiry list */
struct
list_head
mnt_share
;
/* circular list of shared mounts */
...
...
fs/namespace.c
浏览文件 @
52ba1621
...
...
@@ -183,8 +183,8 @@ static struct mount *alloc_vfsmnt(const char *name)
goto
out_free_cache
;
if
(
name
)
{
mnt
->
mnt_devname
=
kstrdup
(
name
,
GFP_KERNEL
);
if
(
!
mnt
->
mnt_devname
)
p
->
mnt_devname
=
kstrdup
(
name
,
GFP_KERNEL
);
if
(
!
p
->
mnt_devname
)
goto
out_free_id
;
}
...
...
@@ -215,7 +215,7 @@ static struct mount *alloc_vfsmnt(const char *name)
#ifdef CONFIG_SMP
out_free_devname:
kfree
(
p
->
mnt
.
mnt
_devname
);
kfree
(
p
->
mnt_devname
);
#endif
out_free_id:
mnt_free_id
(
p
);
...
...
@@ -451,7 +451,7 @@ static void __mnt_unmake_readonly(struct mount *mnt)
static
void
free_vfsmnt
(
struct
mount
*
mnt
)
{
kfree
(
mnt
->
mnt
.
mnt
_devname
);
kfree
(
mnt
->
mnt_devname
);
mnt_free_id
(
mnt
);
#ifdef CONFIG_SMP
free_percpu
(
mnt
->
mnt_pcp
);
...
...
@@ -692,7 +692,7 @@ static struct mount *clone_mnt(struct mount *old, struct dentry *root,
int
flag
)
{
struct
super_block
*
sb
=
old
->
mnt
.
mnt_sb
;
struct
mount
*
mnt
=
alloc_vfsmnt
(
old
->
mnt
.
mnt
_devname
);
struct
mount
*
mnt
=
alloc_vfsmnt
(
old
->
mnt_devname
);
if
(
mnt
)
{
if
(
flag
&
(
CL_SLAVE
|
CL_PRIVATE
))
...
...
@@ -997,7 +997,7 @@ static int show_vfsmnt(struct seq_file *m, void *v)
if
(
err
)
goto
out
;
}
else
{
mangle
(
m
,
mnt
->
mnt_devname
?
mnt
->
mnt_devname
:
"none"
);
mangle
(
m
,
r
->
mnt_devname
?
r
->
mnt_devname
:
"none"
);
}
seq_putc
(
m
,
' '
);
seq_path
(
m
,
&
mnt_path
,
"
\t\n\\
"
);
...
...
@@ -1070,7 +1070,7 @@ static int show_mountinfo(struct seq_file *m, void *v)
if
(
sb
->
s_op
->
show_devname
)
err
=
sb
->
s_op
->
show_devname
(
m
,
mnt
);
else
mangle
(
m
,
mnt
->
mnt_devname
?
mnt
->
mnt_devname
:
"none"
);
mangle
(
m
,
r
->
mnt_devname
?
r
->
mnt_devname
:
"none"
);
if
(
err
)
goto
out
;
seq_puts
(
m
,
sb
->
s_flags
&
MS_RDONLY
?
" ro"
:
" rw"
);
...
...
@@ -1103,9 +1103,9 @@ static int show_vfsstat(struct seq_file *m, void *v)
seq_puts
(
m
,
"device "
);
err
=
mnt
->
mnt_sb
->
s_op
->
show_devname
(
m
,
mnt
);
}
else
{
if
(
mnt
->
mnt_devname
)
{
if
(
r
->
mnt_devname
)
{
seq_puts
(
m
,
"device "
);
mangle
(
m
,
mnt
->
mnt_devname
);
mangle
(
m
,
r
->
mnt_devname
);
}
else
seq_puts
(
m
,
"no device"
);
}
...
...
include/linux/mount.h
浏览文件 @
52ba1621
...
...
@@ -56,7 +56,6 @@ struct vfsmount {
__u32
mnt_fsnotify_mask
;
struct
hlist_head
mnt_fsnotify_marks
;
#endif
const
char
*
mnt_devname
;
/* Name of device e.g. /dev/dsk/hda1 */
};
struct
file
;
/* forward dec */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录