Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
8116bf4c
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
161
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看板
提交
8116bf4c
编写于
1月 21, 2015
作者:
J
Jeff Layton
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
locks: update comments that refer to inode->i_flock
Signed-off-by:
N
Jeff Layton
<
jlayton@primarydata.com
>
上级
3d8e560d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
10 deletion
+11
-10
fs/locks.c
fs/locks.c
+1
-1
include/linux/fs.h
include/linux/fs.h
+10
-9
未找到文件。
fs/locks.c
浏览文件 @
8116bf4c
...
...
@@ -2212,7 +2212,7 @@ int fcntl_setlk(unsigned int fd, struct file *filp, unsigned int cmd,
*/
/*
* we need that spin_lock here - it prevents reordering between
* update of i
node->i_flock
and check for it done in close().
* update of i
_flctx->flc_posix
and check for it done in close().
* rcu_read_lock() wouldn't do.
*/
spin_lock
(
&
current
->
files
->
file_lock
);
...
...
include/linux/fs.h
浏览文件 @
8116bf4c
...
...
@@ -925,12 +925,11 @@ int locks_in_grace(struct net *);
* FIXME: should we create a separate "struct lock_request" to help distinguish
* these two uses?
*
* The
i_flock list is
ordered by:
* The
varous i_flctx lists are
ordered by:
*
* 1) lock type -- FL_LEASEs first, then FL_FLOCK, and finally FL_POSIX
* 2) lock owner
* 3) lock range start
* 4) lock range end
* 1) lock owner
* 2) lock range start
* 3) lock range end
*
* Obviously, the last two criteria only matter for POSIX locks.
*/
...
...
@@ -1992,8 +1991,9 @@ static inline int break_lease(struct inode *inode, unsigned int mode)
{
/*
* Since this check is lockless, we must ensure that any refcounts
* taken are done before checking inode->i_flock. Otherwise, we could
* end up racing with tasks trying to set a new lease on this file.
* taken are done before checking i_flctx->flc_lease. Otherwise, we
* could end up racing with tasks trying to set a new lease on this
* file.
*/
smp_mb
();
if
(
inode
->
i_flctx
&&
!
list_empty_careful
(
&
inode
->
i_flctx
->
flc_lease
))
...
...
@@ -2005,8 +2005,9 @@ static inline int break_deleg(struct inode *inode, unsigned int mode)
{
/*
* Since this check is lockless, we must ensure that any refcounts
* taken are done before checking inode->i_flock. Otherwise, we could
* end up racing with tasks trying to set a new lease on this file.
* taken are done before checking i_flctx->flc_lease. Otherwise, we
* could end up racing with tasks trying to set a new lease on this
* file.
*/
smp_mb
();
if
(
inode
->
i_flctx
&&
!
list_empty_careful
(
&
inode
->
i_flctx
->
flc_lease
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录