Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
9393bd07
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看板
提交
9393bd07
编写于
4月 18, 2009
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
switch follow_down()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
589ff870
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
29 addition
and
33 deletion
+29
-33
fs/afs/mntpt.c
fs/afs/mntpt.c
+1
-1
fs/autofs/dirhash.c
fs/autofs/dirhash.c
+2
-3
fs/autofs4/autofs_i.h
fs/autofs4/autofs_i.h
+3
-3
fs/autofs4/dev-ioctl.c
fs/autofs4/dev-ioctl.c
+1
-1
fs/autofs4/expire.c
fs/autofs4/expire.c
+7
-8
fs/autofs4/root.c
fs/autofs4/root.c
+3
-4
fs/cifs/cifs_dfs_ref.c
fs/cifs/cifs_dfs_ref.c
+1
-1
fs/namei.c
fs/namei.c
+6
-6
fs/namespace.c
fs/namespace.c
+2
-2
fs/nfs/namespace.c
fs/nfs/namespace.c
+1
-1
fs/nfsd/vfs.c
fs/nfsd/vfs.c
+1
-2
include/linux/namei.h
include/linux/namei.h
+1
-1
未找到文件。
fs/afs/mntpt.c
浏览文件 @
9393bd07
...
...
@@ -244,7 +244,7 @@ static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd)
case
-
EBUSY
:
/* someone else made a mount here whilst we were busy */
while
(
d_mountpoint
(
nd
->
path
.
dentry
)
&&
follow_down
(
&
nd
->
path
.
mnt
,
&
nd
->
path
.
dentry
))
follow_down
(
&
nd
->
path
))
;
err
=
0
;
default:
...
...
fs/autofs/dirhash.c
浏览文件 @
9393bd07
...
...
@@ -85,13 +85,12 @@ struct autofs_dir_ent *autofs_expire(struct super_block *sb,
}
path
.
mnt
=
mnt
;
path_get
(
&
path
);
if
(
!
follow_down
(
&
path
.
mnt
,
&
path
.
dentry
))
{
if
(
!
follow_down
(
&
path
))
{
path_put
(
&
path
);
DPRINTK
((
"autofs: not expirable (not a mounted directory): %s
\n
"
,
ent
->
name
));
continue
;
}
while
(
d_mountpoint
(
path
.
dentry
)
&&
follow_down
(
&
path
.
mnt
,
&
path
.
dentry
))
while
(
d_mountpoint
(
path
.
dentry
)
&&
follow_down
(
&
path
));
;
umount_ok
=
may_umount
(
path
.
mnt
);
path_put
(
&
path
);
...
...
fs/autofs4/autofs_i.h
浏览文件 @
9393bd07
...
...
@@ -223,12 +223,12 @@ int autofs4_wait(struct autofs_sb_info *,struct dentry *, enum autofs_notify);
int
autofs4_wait_release
(
struct
autofs_sb_info
*
,
autofs_wqt_t
,
int
);
void
autofs4_catatonic_mode
(
struct
autofs_sb_info
*
);
static
inline
int
autofs4_follow_mount
(
struct
vfsmount
**
mnt
,
struct
dentry
**
dentry
)
static
inline
int
autofs4_follow_mount
(
struct
path
*
path
)
{
int
res
=
0
;
while
(
d_mountpoint
(
*
dentry
))
{
int
followed
=
follow_down
(
mnt
,
dentry
);
while
(
d_mountpoint
(
path
->
dentry
))
{
int
followed
=
follow_down
(
path
);
if
(
!
followed
)
break
;
res
=
1
;
...
...
fs/autofs4/dev-ioctl.c
浏览文件 @
9393bd07
...
...
@@ -562,7 +562,7 @@ static int autofs_dev_ioctl_ismountpoint(struct file *fp,
err
=
have_submounts
(
path
.
dentry
);
if
(
path
.
mnt
->
mnt_mountpoint
!=
path
.
mnt
->
mnt_root
)
{
if
(
follow_down
(
&
path
.
mnt
,
&
path
.
dentry
))
if
(
follow_down
(
&
path
))
magic
=
path
.
mnt
->
mnt_sb
->
s_magic
;
}
}
...
...
fs/autofs4/expire.c
浏览文件 @
9393bd07
...
...
@@ -48,19 +48,19 @@ static inline int autofs4_can_expire(struct dentry *dentry,
static
int
autofs4_mount_busy
(
struct
vfsmount
*
mnt
,
struct
dentry
*
dentry
)
{
struct
dentry
*
top
=
dentry
;
struct
path
path
=
{.
mnt
=
mnt
,
.
dentry
=
dentry
};
int
status
=
1
;
DPRINTK
(
"dentry %p %.*s"
,
dentry
,
(
int
)
dentry
->
d_name
.
len
,
dentry
->
d_name
.
name
);
mntget
(
mnt
);
dget
(
dentry
);
path_get
(
&
path
);
if
(
!
follow_down
(
&
mnt
,
&
dentry
))
if
(
!
follow_down
(
&
path
))
goto
done
;
if
(
is_autofs4_dentry
(
dentry
))
{
struct
autofs_sb_info
*
sbi
=
autofs4_sbi
(
dentry
->
d_sb
);
if
(
is_autofs4_dentry
(
path
.
dentry
))
{
struct
autofs_sb_info
*
sbi
=
autofs4_sbi
(
path
.
dentry
->
d_sb
);
/* This is an autofs submount, we can't expire it */
if
(
autofs_type_indirect
(
sbi
->
type
))
...
...
@@ -70,7 +70,7 @@ static int autofs4_mount_busy(struct vfsmount *mnt, struct dentry *dentry)
* Otherwise it's an offset mount and we need to check
* if we can umount its mount, if there is one.
*/
if
(
!
d_mountpoint
(
dentry
))
{
if
(
!
d_mountpoint
(
path
.
dentry
))
{
status
=
0
;
goto
done
;
}
...
...
@@ -86,8 +86,7 @@ static int autofs4_mount_busy(struct vfsmount *mnt, struct dentry *dentry)
status
=
0
;
done:
DPRINTK
(
"returning = %d"
,
status
);
dput
(
dentry
);
mntput
(
mnt
);
path_put
(
&
path
);
return
status
;
}
...
...
fs/autofs4/root.c
浏览文件 @
9393bd07
...
...
@@ -181,7 +181,7 @@ static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
nd
->
flags
);
/*
* For an expire of a covered direct or offset mount we need
* to b
e
eak out of follow_down() at the autofs mount trigger
* to b
r
eak out of follow_down() at the autofs mount trigger
* (d_mounted--), so we can see the expiring flag, and manage
* the blocking and following here until the expire is completed.
*/
...
...
@@ -190,7 +190,7 @@ static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
if
(
ino
->
flags
&
AUTOFS_INF_EXPIRING
)
{
spin_unlock
(
&
sbi
->
fs_lock
);
/* Follow down to our covering mount. */
if
(
!
follow_down
(
&
nd
->
path
.
mnt
,
&
nd
->
path
.
dentry
))
if
(
!
follow_down
(
&
nd
->
path
))
goto
done
;
goto
follow
;
}
...
...
@@ -230,8 +230,7 @@ static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
* to follow it.
*/
if
(
d_mountpoint
(
dentry
))
{
if
(
!
autofs4_follow_mount
(
&
nd
->
path
.
mnt
,
&
nd
->
path
.
dentry
))
{
if
(
!
autofs4_follow_mount
(
&
nd
->
path
))
{
status
=
-
ENOENT
;
goto
out_error
;
}
...
...
fs/cifs/cifs_dfs_ref.c
浏览文件 @
9393bd07
...
...
@@ -275,7 +275,7 @@ static int add_mount_helper(struct vfsmount *newmnt, struct nameidata *nd,
case
-
EBUSY
:
/* someone else made a mount here whilst we were busy */
while
(
d_mountpoint
(
nd
->
path
.
dentry
)
&&
follow_down
(
&
nd
->
path
.
mnt
,
&
nd
->
path
.
dentry
))
follow_down
(
&
nd
->
path
))
;
err
=
0
;
default:
...
...
fs/namei.c
浏览文件 @
9393bd07
...
...
@@ -731,16 +731,16 @@ static void follow_mount(struct vfsmount **mnt, struct dentry **dentry)
/* no need for dcache_lock, as serialization is taken care in
* namespace.c
*/
int
follow_down
(
struct
vfsmount
**
mnt
,
struct
dentry
**
dentry
)
int
follow_down
(
struct
path
*
path
)
{
struct
vfsmount
*
mounted
;
mounted
=
lookup_mnt
(
*
mnt
,
*
dentry
);
mounted
=
lookup_mnt
(
path
->
mnt
,
path
->
dentry
);
if
(
mounted
)
{
dput
(
*
dentry
);
mntput
(
*
mnt
);
*
mnt
=
mounted
;
*
dentry
=
dget
(
mounted
->
mnt_root
);
dput
(
path
->
dentry
);
mntput
(
path
->
mnt
);
path
->
mnt
=
mounted
;
path
->
dentry
=
dget
(
mounted
->
mnt_root
);
return
1
;
}
return
0
;
...
...
fs/namespace.c
浏览文件 @
9393bd07
...
...
@@ -1601,7 +1601,7 @@ static int do_move_mount(struct path *path, char *old_name)
down_write
(
&
namespace_sem
);
while
(
d_mountpoint
(
path
->
dentry
)
&&
follow_down
(
&
path
->
mnt
,
&
path
->
dentry
))
follow_down
(
path
))
;
err
=
-
EINVAL
;
if
(
!
check_mnt
(
path
->
mnt
)
||
!
check_mnt
(
old_path
.
mnt
))
...
...
@@ -1695,7 +1695,7 @@ int do_add_mount(struct vfsmount *newmnt, struct path *path,
down_write
(
&
namespace_sem
);
/* Something was mounted here while we slept */
while
(
d_mountpoint
(
path
->
dentry
)
&&
follow_down
(
&
path
->
mnt
,
&
path
->
dentry
))
follow_down
(
path
))
;
err
=
-
EINVAL
;
if
(
!
(
mnt_flags
&
MNT_SHRINKABLE
)
&&
!
check_mnt
(
path
->
mnt
))
...
...
fs/nfs/namespace.c
浏览文件 @
9393bd07
...
...
@@ -154,7 +154,7 @@ static void * nfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd)
goto
out
;
out_follow:
while
(
d_mountpoint
(
nd
->
path
.
dentry
)
&&
follow_down
(
&
nd
->
path
.
mnt
,
&
nd
->
path
.
dentry
))
follow_down
(
&
nd
->
path
))
;
err
=
0
;
goto
out
;
...
...
fs/nfsd/vfs.c
浏览文件 @
9393bd07
...
...
@@ -105,8 +105,7 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp,
.
dentry
=
dget
(
dentry
)};
int
err
=
0
;
while
(
follow_down
(
&
path
.
mnt
,
&
path
.
dentry
)
&&
d_mountpoint
(
path
.
dentry
))
while
(
d_mountpoint
(
path
.
dentry
)
&&
follow_down
(
&
path
))
;
exp2
=
rqst_exp_get_by_name
(
rqstp
,
&
path
);
...
...
include/linux/namei.h
浏览文件 @
9393bd07
...
...
@@ -78,7 +78,7 @@ extern void release_open_intent(struct nameidata *);
extern
struct
dentry
*
lookup_one_len
(
const
char
*
,
struct
dentry
*
,
int
);
extern
struct
dentry
*
lookup_one_noperm
(
const
char
*
,
struct
dentry
*
);
extern
int
follow_down
(
struct
vfsmount
**
,
struct
dentry
*
*
);
extern
int
follow_down
(
struct
path
*
);
extern
int
follow_up
(
struct
path
*
);
extern
struct
dentry
*
lock_rename
(
struct
dentry
*
,
struct
dentry
*
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录