Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
e64c390c
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e64c390c
编写于
4月 18, 2009
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
switch rqst_exp_parent()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
91c9fa8f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
28 deletion
+23
-28
fs/nfsd/export.c
fs/nfsd/export.c
+10
-15
fs/nfsd/vfs.c
fs/nfsd/vfs.c
+12
-11
include/linux/nfsd/export.h
include/linux/nfsd/export.h
+1
-2
未找到文件。
fs/nfsd/export.c
浏览文件 @
e64c390c
...
...
@@ -1299,24 +1299,19 @@ rqst_exp_find(struct svc_rqst *rqstp, int fsid_type, u32 *fsidv)
}
struct
svc_export
*
rqst_exp_parent
(
struct
svc_rqst
*
rqstp
,
struct
vfsmount
*
mnt
,
struct
dentry
*
dentry
)
rqst_exp_parent
(
struct
svc_rqst
*
rqstp
,
struct
path
*
path
)
{
struct
svc_export
*
exp
;
struct
path
path
=
{.
mnt
=
mnt
,
.
dentry
=
dentry
};
dget
(
dentry
);
exp
=
rqst_exp_get_by_name
(
rqstp
,
&
path
);
while
(
PTR_ERR
(
exp
)
==
-
ENOENT
&&
!
IS_ROOT
(
dentry
))
{
struct
dentry
*
parent
;
struct
dentry
*
saved
=
dget
(
path
->
dentry
);
struct
svc_export
*
exp
=
rqst_exp_get_by_name
(
rqstp
,
path
);
parent
=
dget_parent
(
dentry
);
dput
(
dentry
);
dentry
=
parent
;
exp
=
rqst_exp_get_by_name
(
rqstp
,
&
path
);
while
(
PTR_ERR
(
exp
)
==
-
ENOENT
&&
!
IS_ROOT
(
path
->
dentry
))
{
struct
dentry
*
parent
=
dget_parent
(
path
->
dentry
);
dput
(
path
->
dentry
);
path
->
dentry
=
parent
;
exp
=
rqst_exp_get_by_name
(
rqstp
,
path
);
}
dput
(
dentry
);
dput
(
path
->
dentry
);
path
->
dentry
=
saved
;
return
exp
;
}
...
...
fs/nfsd/vfs.c
浏览文件 @
e64c390c
...
...
@@ -169,28 +169,29 @@ nfsd_lookup_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp,
/* checking mountpoint crossing is very different when stepping up */
struct
svc_export
*
exp2
=
NULL
;
struct
dentry
*
dp
;
struct
vfsmount
*
mnt
=
mntget
(
exp
->
ex_path
.
mnt
);
dentry
=
dget
(
dparent
);
while
(
dentry
==
mnt
->
mnt_root
&&
follow_up
(
&
mnt
,
&
dentry
))
struct
path
path
=
{.
mnt
=
mntget
(
exp
->
ex_path
.
mnt
),
.
dentry
=
dget
(
dparent
)};
while
(
path
.
dentry
==
path
.
mnt
->
mnt_root
&&
follow_up
(
&
path
.
mnt
,
&
path
.
dentry
))
;
dp
=
dget_parent
(
dentry
);
dput
(
dentry
);
dentry
=
dp
;
dp
=
dget_parent
(
path
.
dentry
);
dput
(
path
.
dentry
);
path
.
dentry
=
dp
;
exp2
=
rqst_exp_parent
(
rqstp
,
mnt
,
dentry
);
exp2
=
rqst_exp_parent
(
rqstp
,
&
path
);
if
(
PTR_ERR
(
exp2
)
==
-
ENOENT
)
{
dput
(
dentry
);
dentry
=
dget
(
dparent
);
}
else
if
(
IS_ERR
(
exp2
))
{
host_err
=
PTR_ERR
(
exp2
);
dput
(
dentry
);
mntput
(
mnt
);
path_put
(
&
path
);
goto
out_nfserr
;
}
else
{
dentry
=
dget
(
path
.
dentry
);
exp_put
(
exp
);
exp
=
exp2
;
}
mntput
(
mnt
);
path_put
(
&
path
);
}
}
else
{
fh_lock
(
fhp
);
...
...
include/linux/nfsd/export.h
浏览文件 @
e64c390c
...
...
@@ -127,8 +127,7 @@ void exp_readunlock(void);
struct
svc_export
*
rqst_exp_get_by_name
(
struct
svc_rqst
*
,
struct
path
*
);
struct
svc_export
*
rqst_exp_parent
(
struct
svc_rqst
*
,
struct
vfsmount
*
mnt
,
struct
dentry
*
dentry
);
struct
path
*
);
int
exp_rootfh
(
struct
auth_domain
*
,
char
*
path
,
struct
knfsd_fh
*
,
int
maxsize
);
__be32
exp_pseudoroot
(
struct
svc_rqst
*
,
struct
svc_fh
*
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录