Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
a4d7f168
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
156
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a4d7f168
编写于
4月 16, 2010
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NFS: Reduce the stack footprint of nfs_follow_mountpoint()
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
815409d2
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
6 deletion
+14
-6
fs/nfs/namespace.c
fs/nfs/namespace.c
+14
-6
未找到文件。
fs/nfs/namespace.c
浏览文件 @
a4d7f168
...
...
@@ -105,8 +105,8 @@ static void * nfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd)
struct
vfsmount
*
mnt
;
struct
nfs_server
*
server
=
NFS_SERVER
(
dentry
->
d_inode
);
struct
dentry
*
parent
;
struct
nfs_fh
fh
;
struct
nfs_fattr
fattr
;
struct
nfs_fh
*
fh
=
NULL
;
struct
nfs_fattr
*
fattr
=
NULL
;
int
err
;
dprintk
(
"--> nfs_follow_mountpoint()
\n
"
);
...
...
@@ -115,6 +115,12 @@ static void * nfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd)
if
(
IS_ROOT
(
dentry
))
goto
out_err
;
err
=
-
ENOMEM
;
fh
=
nfs_alloc_fhandle
();
fattr
=
nfs_alloc_fattr
();
if
(
fh
==
NULL
||
fattr
==
NULL
)
goto
out_err
;
dprintk
(
"%s: enter
\n
"
,
__func__
);
dput
(
nd
->
path
.
dentry
);
nd
->
path
.
dentry
=
dget
(
dentry
);
...
...
@@ -123,16 +129,16 @@ static void * nfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd)
parent
=
dget_parent
(
nd
->
path
.
dentry
);
err
=
server
->
nfs_client
->
rpc_ops
->
lookup
(
parent
->
d_inode
,
&
nd
->
path
.
dentry
->
d_name
,
&
fh
,
&
fattr
);
fh
,
fattr
);
dput
(
parent
);
if
(
err
!=
0
)
goto
out_err
;
if
(
fattr
.
valid
&
NFS_ATTR_FATTR_V4_REFERRAL
)
if
(
fattr
->
valid
&
NFS_ATTR_FATTR_V4_REFERRAL
)
mnt
=
nfs_do_refmount
(
nd
->
path
.
mnt
,
nd
->
path
.
dentry
);
else
mnt
=
nfs_do_submount
(
nd
->
path
.
mnt
,
nd
->
path
.
dentry
,
&
fh
,
&
fattr
);
mnt
=
nfs_do_submount
(
nd
->
path
.
mnt
,
nd
->
path
.
dentry
,
fh
,
fattr
);
err
=
PTR_ERR
(
mnt
);
if
(
IS_ERR
(
mnt
))
goto
out_err
;
...
...
@@ -151,6 +157,8 @@ static void * nfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd)
nd
->
path
.
dentry
=
dget
(
mnt
->
mnt_root
);
schedule_delayed_work
(
&
nfs_automount_task
,
nfs_mountpoint_expiry_timeout
);
out:
nfs_free_fattr
(
fattr
);
nfs_free_fhandle
(
fh
);
dprintk
(
"%s: done, returned %d
\n
"
,
__func__
,
err
);
dprintk
(
"<-- nfs_follow_mountpoint() = %d
\n
"
,
err
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录