Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
cae7a073
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,发现更多精彩内容 >>
提交
cae7a073
编写于
10月 18, 2005
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NFSv4: Return delegation upon rename or removal of file.
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
cdce5d6b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
20 addition
and
4 deletion
+20
-4
fs/nfs/delegation.c
fs/nfs/delegation.c
+1
-1
fs/nfs/delegation.h
fs/nfs/delegation.h
+15
-1
fs/nfs/dir.c
fs/nfs/dir.c
+3
-0
fs/nfs/inode.c
fs/nfs/inode.c
+1
-2
未找到文件。
fs/nfs/delegation.c
浏览文件 @
cae7a073
...
...
@@ -142,7 +142,7 @@ static void nfs_msync_inode(struct inode *inode)
/*
* Basic procedure for returning a delegation to the server
*/
int
nfs_inode_return_delegation
(
struct
inode
*
inode
)
int
__
nfs_inode_return_delegation
(
struct
inode
*
inode
)
{
struct
nfs4_client
*
clp
=
NFS_SERVER
(
inode
)
->
nfs4_state
;
struct
nfs_inode
*
nfsi
=
NFS_I
(
inode
);
...
...
fs/nfs/delegation.h
浏览文件 @
cae7a073
...
...
@@ -25,7 +25,7 @@ struct nfs_delegation {
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
);
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
);
struct
inode
*
nfs_delegation_find_inode
(
struct
nfs4_client
*
clp
,
const
struct
nfs_fh
*
fhandle
);
...
...
@@ -47,11 +47,25 @@ static inline int nfs_have_delegation(struct inode *inode, int flags)
return
1
;
return
0
;
}
static
inline
int
nfs_inode_return_delegation
(
struct
inode
*
inode
)
{
int
err
=
0
;
if
(
NFS_I
(
inode
)
->
delegation
!=
NULL
)
err
=
__nfs_inode_return_delegation
(
inode
);
return
err
;
}
#else
static
inline
int
nfs_have_delegation
(
struct
inode
*
inode
,
int
flags
)
{
return
0
;
}
static
inline
int
nfs_inode_return_delegation
(
struct
inode
*
inode
)
{
return
0
;
}
#endif
#endif
fs/nfs/dir.c
浏览文件 @
cae7a073
...
...
@@ -801,6 +801,7 @@ static int nfs_dentry_delete(struct dentry *dentry)
*/
static
void
nfs_dentry_iput
(
struct
dentry
*
dentry
,
struct
inode
*
inode
)
{
nfs_inode_return_delegation
(
inode
);
if
(
dentry
->
d_flags
&
DCACHE_NFSFS_RENAMED
)
{
lock_kernel
();
inode
->
i_nlink
--
;
...
...
@@ -1329,6 +1330,7 @@ static int nfs_safe_remove(struct dentry *dentry)
nfs_begin_data_update
(
dir
);
if
(
inode
!=
NULL
)
{
nfs_inode_return_delegation
(
inode
);
nfs_begin_data_update
(
inode
);
error
=
NFS_PROTO
(
dir
)
->
remove
(
dir
,
&
dentry
->
d_name
);
/* The VFS may want to delete this inode */
...
...
@@ -1547,6 +1549,7 @@ static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry,
nfs_wb_all
(
old_inode
);
shrink_dcache_parent
(
old_dentry
);
}
nfs_inode_return_delegation
(
old_inode
);
if
(
new_inode
)
d_delete
(
new_dentry
);
...
...
fs/nfs/inode.c
浏览文件 @
cae7a073
...
...
@@ -1671,8 +1671,7 @@ static void nfs4_clear_inode(struct inode *inode)
struct
nfs_inode
*
nfsi
=
NFS_I
(
inode
);
/* If we are holding a delegation, return it! */
if
(
nfsi
->
delegation
!=
NULL
)
nfs_inode_return_delegation
(
inode
);
nfs_inode_return_delegation
(
inode
);
/* First call standard NFS clear_inode() code */
nfs_clear_inode
(
inode
);
/* Now clear out any remaining state */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录