Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
1cda707d
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 3 年多
通知
13
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
1cda707d
编写于
2月 19, 2010
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NFS: Remove requirement for inode->i_mutex from nfs_invalidate_mapping
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
5cf95214
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
3 addition
and
43 deletion
+3
-43
fs/nfs/dir.c
fs/nfs/dir.c
+1
-1
fs/nfs/inode.c
fs/nfs/inode.c
+1
-40
fs/nfs/symlink.c
fs/nfs/symlink.c
+1
-1
include/linux/nfs_fs.h
include/linux/nfs_fs.h
+0
-1
未找到文件。
fs/nfs/dir.c
浏览文件 @
1cda707d
...
...
@@ -560,7 +560,7 @@ static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
desc
->
entry
=
&
my_entry
;
nfs_block_sillyrename
(
dentry
);
res
=
nfs_revalidate_mapping
_nolock
(
inode
,
filp
->
f_mapping
);
res
=
nfs_revalidate_mapping
(
inode
,
filp
->
f_mapping
);
if
(
res
<
0
)
goto
out
;
...
...
fs/nfs/inode.c
浏览文件 @
1cda707d
...
...
@@ -754,7 +754,7 @@ int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode)
return
__nfs_revalidate_inode
(
server
,
inode
);
}
static
int
nfs_invalidate_mapping
_nolock
(
struct
inode
*
inode
,
struct
address_space
*
mapping
)
static
int
nfs_invalidate_mapping
(
struct
inode
*
inode
,
struct
address_space
*
mapping
)
{
struct
nfs_inode
*
nfsi
=
NFS_I
(
inode
);
...
...
@@ -775,49 +775,10 @@ static int nfs_invalidate_mapping_nolock(struct inode *inode, struct address_spa
return
0
;
}
static
int
nfs_invalidate_mapping
(
struct
inode
*
inode
,
struct
address_space
*
mapping
)
{
int
ret
=
0
;
mutex_lock
(
&
inode
->
i_mutex
);
if
(
NFS_I
(
inode
)
->
cache_validity
&
NFS_INO_INVALID_DATA
)
{
ret
=
nfs_sync_mapping
(
mapping
);
if
(
ret
==
0
)
ret
=
nfs_invalidate_mapping_nolock
(
inode
,
mapping
);
}
mutex_unlock
(
&
inode
->
i_mutex
);
return
ret
;
}
/**
* nfs_revalidate_mapping_nolock - Revalidate the pagecache
* @inode - pointer to host inode
* @mapping - pointer to mapping
*/
int
nfs_revalidate_mapping_nolock
(
struct
inode
*
inode
,
struct
address_space
*
mapping
)
{
struct
nfs_inode
*
nfsi
=
NFS_I
(
inode
);
int
ret
=
0
;
if
((
nfsi
->
cache_validity
&
NFS_INO_REVAL_PAGECACHE
)
||
nfs_attribute_timeout
(
inode
)
||
NFS_STALE
(
inode
))
{
ret
=
__nfs_revalidate_inode
(
NFS_SERVER
(
inode
),
inode
);
if
(
ret
<
0
)
goto
out
;
}
if
(
nfsi
->
cache_validity
&
NFS_INO_INVALID_DATA
)
ret
=
nfs_invalidate_mapping_nolock
(
inode
,
mapping
);
out:
return
ret
;
}
/**
* nfs_revalidate_mapping - Revalidate the pagecache
* @inode - pointer to host inode
* @mapping - pointer to mapping
*
* This version of the function will take the inode->i_mutex and attempt to
* flush out all dirty data if it needs to invalidate the page cache.
*/
int
nfs_revalidate_mapping
(
struct
inode
*
inode
,
struct
address_space
*
mapping
)
{
...
...
fs/nfs/symlink.c
浏览文件 @
1cda707d
...
...
@@ -50,7 +50,7 @@ static void *nfs_follow_link(struct dentry *dentry, struct nameidata *nd)
struct
page
*
page
;
void
*
err
;
err
=
ERR_PTR
(
nfs_revalidate_mapping
_nolock
(
inode
,
inode
->
i_mapping
));
err
=
ERR_PTR
(
nfs_revalidate_mapping
(
inode
,
inode
->
i_mapping
));
if
(
err
)
goto
read_failed
;
page
=
read_cache_page
(
&
inode
->
i_data
,
0
,
...
...
include/linux/nfs_fs.h
浏览文件 @
1cda707d
...
...
@@ -347,7 +347,6 @@ extern int nfs_attribute_timeout(struct inode *inode);
extern
int
nfs_revalidate_inode
(
struct
nfs_server
*
server
,
struct
inode
*
inode
);
extern
int
__nfs_revalidate_inode
(
struct
nfs_server
*
,
struct
inode
*
);
extern
int
nfs_revalidate_mapping
(
struct
inode
*
inode
,
struct
address_space
*
mapping
);
extern
int
nfs_revalidate_mapping_nolock
(
struct
inode
*
inode
,
struct
address_space
*
mapping
);
extern
int
nfs_setattr
(
struct
dentry
*
,
struct
iattr
*
);
extern
void
nfs_setattr_update_inode
(
struct
inode
*
inode
,
struct
iattr
*
attr
);
extern
struct
nfs_open_context
*
get_nfs_open_context
(
struct
nfs_open_context
*
ctx
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录