Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
e047a10c
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
e047a10c
编写于
6月 16, 2010
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NFSv41: Fix nfs_async_inode_return_delegation() ugliness
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
c48f4f35
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
8 addition
and
19 deletion
+8
-19
fs/nfs/callback_proc.c
fs/nfs/callback_proc.c
+1
-12
fs/nfs/delegation.c
fs/nfs/delegation.c
+2
-4
fs/nfs/delegation.h
fs/nfs/delegation.h
+1
-3
fs/nfs/nfs4_fs.h
fs/nfs/nfs4_fs.h
+2
-0
fs/nfs/nfs4proc.c
fs/nfs/nfs4proc.c
+2
-0
未找到文件。
fs/nfs/callback_proc.c
浏览文件 @
e047a10c
...
@@ -62,16 +62,6 @@ __be32 nfs4_callback_getattr(struct cb_getattrargs *args, struct cb_getattrres *
...
@@ -62,16 +62,6 @@ __be32 nfs4_callback_getattr(struct cb_getattrargs *args, struct cb_getattrres *
return
res
->
status
;
return
res
->
status
;
}
}
static
int
(
*
nfs_validate_delegation_stateid
(
struct
nfs_client
*
clp
))(
struct
nfs_delegation
*
,
const
nfs4_stateid
*
)
{
#if defined(CONFIG_NFS_V4_1)
if
(
clp
->
cl_minorversion
>
0
)
return
nfs41_validate_delegation_stateid
;
#endif
return
nfs4_validate_delegation_stateid
;
}
__be32
nfs4_callback_recall
(
struct
cb_recallargs
*
args
,
void
*
dummy
)
__be32
nfs4_callback_recall
(
struct
cb_recallargs
*
args
,
void
*
dummy
)
{
{
struct
nfs_client
*
clp
;
struct
nfs_client
*
clp
;
...
@@ -92,8 +82,7 @@ __be32 nfs4_callback_recall(struct cb_recallargs *args, void *dummy)
...
@@ -92,8 +82,7 @@ __be32 nfs4_callback_recall(struct cb_recallargs *args, void *dummy)
inode
=
nfs_delegation_find_inode
(
clp
,
&
args
->
fh
);
inode
=
nfs_delegation_find_inode
(
clp
,
&
args
->
fh
);
if
(
inode
!=
NULL
)
{
if
(
inode
!=
NULL
)
{
/* Set up a helper thread to actually return the delegation */
/* Set up a helper thread to actually return the delegation */
switch
(
nfs_async_inode_return_delegation
(
inode
,
&
args
->
stateid
,
switch
(
nfs_async_inode_return_delegation
(
inode
,
&
args
->
stateid
))
{
nfs_validate_delegation_stateid
(
clp
)))
{
case
0
:
case
0
:
res
=
0
;
res
=
0
;
break
;
break
;
...
...
fs/nfs/delegation.c
浏览文件 @
e047a10c
...
@@ -471,9 +471,7 @@ void nfs_expire_unreferenced_delegations(struct nfs_client *clp)
...
@@ -471,9 +471,7 @@ void nfs_expire_unreferenced_delegations(struct nfs_client *clp)
/*
/*
* Asynchronous delegation recall!
* Asynchronous delegation recall!
*/
*/
int
nfs_async_inode_return_delegation
(
struct
inode
*
inode
,
const
nfs4_stateid
*
stateid
,
int
nfs_async_inode_return_delegation
(
struct
inode
*
inode
,
const
nfs4_stateid
*
stateid
)
int
(
*
validate_stateid
)(
struct
nfs_delegation
*
delegation
,
const
nfs4_stateid
*
stateid
))
{
{
struct
nfs_client
*
clp
=
NFS_SERVER
(
inode
)
->
nfs_client
;
struct
nfs_client
*
clp
=
NFS_SERVER
(
inode
)
->
nfs_client
;
struct
nfs_delegation
*
delegation
;
struct
nfs_delegation
*
delegation
;
...
@@ -481,7 +479,7 @@ int nfs_async_inode_return_delegation(struct inode *inode, const nfs4_stateid *s
...
@@ -481,7 +479,7 @@ int nfs_async_inode_return_delegation(struct inode *inode, const nfs4_stateid *s
rcu_read_lock
();
rcu_read_lock
();
delegation
=
rcu_dereference
(
NFS_I
(
inode
)
->
delegation
);
delegation
=
rcu_dereference
(
NFS_I
(
inode
)
->
delegation
);
if
(
!
validate_stateid
(
delegation
,
stateid
))
{
if
(
!
clp
->
cl_mvops
->
validate_stateid
(
delegation
,
stateid
))
{
rcu_read_unlock
();
rcu_read_unlock
();
return
-
ENOENT
;
return
-
ENOENT
;
}
}
...
...
fs/nfs/delegation.h
浏览文件 @
e047a10c
...
@@ -34,9 +34,7 @@ enum {
...
@@ -34,9 +34,7 @@ enum {
int
nfs_inode_set_delegation
(
struct
inode
*
inode
,
struct
rpc_cred
*
cred
,
struct
nfs_openres
*
res
);
int
nfs_inode_set_delegation
(
struct
inode
*
inode
,
struct
rpc_cred
*
cred
,
struct
nfs_openres
*
res
);
void
nfs_inode_reclaim_delegation
(
struct
inode
*
inode
,
struct
rpc_cred
*
cred
,
struct
nfs_openres
*
res
);
void
nfs_inode_reclaim_delegation
(
struct
inode
*
inode
,
struct
rpc_cred
*
cred
,
struct
nfs_openres
*
res
);
int
nfs_inode_return_delegation
(
struct
inode
*
inode
);
int
nfs_inode_return_delegation
(
struct
inode
*
inode
);
int
nfs_async_inode_return_delegation
(
struct
inode
*
inode
,
const
nfs4_stateid
*
stateid
,
int
nfs_async_inode_return_delegation
(
struct
inode
*
inode
,
const
nfs4_stateid
*
stateid
);
int
(
*
validate_stateid
)(
struct
nfs_delegation
*
delegation
,
const
nfs4_stateid
*
stateid
));
void
nfs_inode_return_delegation_noreclaim
(
struct
inode
*
inode
);
void
nfs_inode_return_delegation_noreclaim
(
struct
inode
*
inode
);
struct
inode
*
nfs_delegation_find_inode
(
struct
nfs_client
*
clp
,
const
struct
nfs_fh
*
fhandle
);
struct
inode
*
nfs_delegation_find_inode
(
struct
nfs_client
*
clp
,
const
struct
nfs_fh
*
fhandle
);
...
...
fs/nfs/nfs4_fs.h
浏览文件 @
e047a10c
...
@@ -60,6 +60,8 @@ struct nfs4_minor_version_ops {
...
@@ -60,6 +60,8 @@ struct nfs4_minor_version_ops {
struct
nfs4_sequence_args
*
args
,
struct
nfs4_sequence_args
*
args
,
struct
nfs4_sequence_res
*
res
,
struct
nfs4_sequence_res
*
res
,
int
cache_reply
);
int
cache_reply
);
int
(
*
validate_stateid
)(
struct
nfs_delegation
*
,
const
nfs4_stateid
*
);
const
struct
nfs4_state_recovery_ops
*
reboot_recovery_ops
;
const
struct
nfs4_state_recovery_ops
*
reboot_recovery_ops
;
const
struct
nfs4_state_recovery_ops
*
nograce_recovery_ops
;
const
struct
nfs4_state_recovery_ops
*
nograce_recovery_ops
;
const
struct
nfs4_state_maintenance_ops
*
state_renewal_ops
;
const
struct
nfs4_state_maintenance_ops
*
state_renewal_ops
;
...
...
fs/nfs/nfs4proc.c
浏览文件 @
e047a10c
...
@@ -5356,6 +5356,7 @@ struct nfs4_state_maintenance_ops nfs41_state_renewal_ops = {
...
@@ -5356,6 +5356,7 @@ struct nfs4_state_maintenance_ops nfs41_state_renewal_ops = {
static
const
struct
nfs4_minor_version_ops
nfs_v4_0_minor_ops
=
{
static
const
struct
nfs4_minor_version_ops
nfs_v4_0_minor_ops
=
{
.
minor_version
=
0
,
.
minor_version
=
0
,
.
call_sync
=
_nfs4_call_sync
,
.
call_sync
=
_nfs4_call_sync
,
.
validate_stateid
=
nfs4_validate_delegation_stateid
,
.
reboot_recovery_ops
=
&
nfs40_reboot_recovery_ops
,
.
reboot_recovery_ops
=
&
nfs40_reboot_recovery_ops
,
.
nograce_recovery_ops
=
&
nfs40_nograce_recovery_ops
,
.
nograce_recovery_ops
=
&
nfs40_nograce_recovery_ops
,
.
state_renewal_ops
=
&
nfs40_state_renewal_ops
,
.
state_renewal_ops
=
&
nfs40_state_renewal_ops
,
...
@@ -5365,6 +5366,7 @@ static const struct nfs4_minor_version_ops nfs_v4_0_minor_ops = {
...
@@ -5365,6 +5366,7 @@ static const struct nfs4_minor_version_ops nfs_v4_0_minor_ops = {
static
const
struct
nfs4_minor_version_ops
nfs_v4_1_minor_ops
=
{
static
const
struct
nfs4_minor_version_ops
nfs_v4_1_minor_ops
=
{
.
minor_version
=
1
,
.
minor_version
=
1
,
.
call_sync
=
_nfs4_call_sync_session
,
.
call_sync
=
_nfs4_call_sync_session
,
.
validate_stateid
=
nfs41_validate_delegation_stateid
,
.
reboot_recovery_ops
=
&
nfs41_reboot_recovery_ops
,
.
reboot_recovery_ops
=
&
nfs41_reboot_recovery_ops
,
.
nograce_recovery_ops
=
&
nfs41_nograce_recovery_ops
,
.
nograce_recovery_ops
=
&
nfs41_nograce_recovery_ops
,
.
state_renewal_ops
=
&
nfs41_state_renewal_ops
,
.
state_renewal_ops
=
&
nfs41_state_renewal_ops
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录