Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
8d66bf54
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看板
提交
8d66bf54
编写于
8月 01, 2008
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] pass struct path * to do_add_mount()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
d5686b44
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
13 addition
and
12 deletion
+13
-12
fs/afs/mntpt.c
fs/afs/mntpt.c
+1
-1
fs/cifs/cifs_dfs_ref.c
fs/cifs/cifs_dfs_ref.c
+1
-1
fs/namespace.c
fs/namespace.c
+8
-8
fs/nfs/namespace.c
fs/nfs/namespace.c
+1
-1
include/linux/mount.h
include/linux/mount.h
+2
-1
未找到文件。
fs/afs/mntpt.c
浏览文件 @
8d66bf54
...
...
@@ -232,7 +232,7 @@ static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd)
}
mntget
(
newmnt
);
err
=
do_add_mount
(
newmnt
,
nd
,
MNT_SHRINKABLE
,
&
afs_vfsmounts
);
err
=
do_add_mount
(
newmnt
,
&
nd
->
path
,
MNT_SHRINKABLE
,
&
afs_vfsmounts
);
switch
(
err
)
{
case
0
:
path_put
(
&
nd
->
path
);
...
...
fs/cifs/cifs_dfs_ref.c
浏览文件 @
8d66bf54
...
...
@@ -226,7 +226,7 @@ static int add_mount_helper(struct vfsmount *newmnt, struct nameidata *nd,
int
err
;
mntget
(
newmnt
);
err
=
do_add_mount
(
newmnt
,
nd
,
nd
->
path
.
mnt
->
mnt_flags
,
mntlist
);
err
=
do_add_mount
(
newmnt
,
&
nd
->
path
,
nd
->
path
.
mnt
->
mnt_flags
,
mntlist
);
switch
(
err
)
{
case
0
:
path_put
(
&
nd
->
path
);
...
...
fs/namespace.c
浏览文件 @
8d66bf54
...
...
@@ -1667,31 +1667,31 @@ static noinline int do_new_mount(struct nameidata *nd, char *type, int flags,
if
(
IS_ERR
(
mnt
))
return
PTR_ERR
(
mnt
);
return
do_add_mount
(
mnt
,
nd
,
mnt_flags
,
NULL
);
return
do_add_mount
(
mnt
,
&
nd
->
path
,
mnt_flags
,
NULL
);
}
/*
* add a mount into a namespace's mount tree
* - provide the option of adding the new mount to an expiration list
*/
int
do_add_mount
(
struct
vfsmount
*
newmnt
,
struct
nameidata
*
nd
,
int
do_add_mount
(
struct
vfsmount
*
newmnt
,
struct
path
*
path
,
int
mnt_flags
,
struct
list_head
*
fslist
)
{
int
err
;
down_write
(
&
namespace_sem
);
/* Something was mounted here while we slept */
while
(
d_mountpoint
(
nd
->
path
.
dentry
)
&&
follow_down
(
&
nd
->
path
.
mnt
,
&
nd
->
path
.
dentry
))
while
(
d_mountpoint
(
path
->
dentry
)
&&
follow_down
(
&
path
->
mnt
,
&
path
->
dentry
))
;
err
=
-
EINVAL
;
if
(
!
check_mnt
(
nd
->
path
.
mnt
))
if
(
!
check_mnt
(
path
->
mnt
))
goto
unlock
;
/* Refuse the same filesystem on the same mount point */
err
=
-
EBUSY
;
if
(
nd
->
path
.
mnt
->
mnt_sb
==
newmnt
->
mnt_sb
&&
nd
->
path
.
mnt
->
mnt_root
==
nd
->
path
.
dentry
)
if
(
path
->
mnt
->
mnt_sb
==
newmnt
->
mnt_sb
&&
path
->
mnt
->
mnt_root
==
path
->
dentry
)
goto
unlock
;
err
=
-
EINVAL
;
...
...
@@ -1699,7 +1699,7 @@ int do_add_mount(struct vfsmount *newmnt, struct nameidata *nd,
goto
unlock
;
newmnt
->
mnt_flags
=
mnt_flags
;
if
((
err
=
graft_tree
(
newmnt
,
&
nd
->
path
)))
if
((
err
=
graft_tree
(
newmnt
,
path
)))
goto
unlock
;
if
(
fslist
)
/* add to the specified expiration list */
...
...
fs/nfs/namespace.c
浏览文件 @
8d66bf54
...
...
@@ -129,7 +129,7 @@ static void * nfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd)
goto
out_err
;
mntget
(
mnt
);
err
=
do_add_mount
(
mnt
,
nd
,
nd
->
path
.
mnt
->
mnt_flags
|
MNT_SHRINKABLE
,
err
=
do_add_mount
(
mnt
,
&
nd
->
path
,
nd
->
path
.
mnt
->
mnt_flags
|
MNT_SHRINKABLE
,
&
nfs_automount_list
);
if
(
err
<
0
)
{
mntput
(
mnt
);
...
...
include/linux/mount.h
浏览文件 @
8d66bf54
...
...
@@ -105,7 +105,8 @@ extern struct vfsmount *vfs_kern_mount(struct file_system_type *type,
struct
nameidata
;
extern
int
do_add_mount
(
struct
vfsmount
*
newmnt
,
struct
nameidata
*
nd
,
struct
path
;
extern
int
do_add_mount
(
struct
vfsmount
*
newmnt
,
struct
path
*
path
,
int
mnt_flags
,
struct
list_head
*
fslist
);
extern
void
mark_mounts_for_expiry
(
struct
list_head
*
mounts
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录