Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
f76c23da
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
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看板
提交
f76c23da
编写于
10月 21, 2014
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lustre: use is_root_inode()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
fd5c6c36
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
11 deletion
+9
-11
drivers/staging/lustre/lustre/llite/dir.c
drivers/staging/lustre/lustre/llite/dir.c
+2
-3
drivers/staging/lustre/lustre/llite/file.c
drivers/staging/lustre/lustre/llite/file.c
+6
-7
drivers/staging/lustre/lustre/llite/namei.c
drivers/staging/lustre/lustre/llite/namei.c
+1
-1
未找到文件。
drivers/staging/lustre/lustre/llite/dir.c
浏览文件 @
f76c23da
...
@@ -1389,7 +1389,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
...
@@ -1389,7 +1389,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
return
-
EFAULT
;
return
-
EFAULT
;
}
}
if
(
i
node
->
i_sb
->
s_root
==
file
->
f_dentry
)
if
(
i
s_root_inode
(
inode
)
)
set_default
=
1
;
set_default
=
1
;
/* in v1 and v3 cases lumv1 points to data */
/* in v1 and v3 cases lumv1 points to data */
...
@@ -1780,8 +1780,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
...
@@ -1780,8 +1780,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
return
ll_flush_ctx
(
inode
);
return
ll_flush_ctx
(
inode
);
#ifdef CONFIG_FS_POSIX_ACL
#ifdef CONFIG_FS_POSIX_ACL
case
LL_IOC_RMTACL
:
{
case
LL_IOC_RMTACL
:
{
if
(
sbi
->
ll_flags
&
LL_SBI_RMT_CLIENT
&&
if
(
sbi
->
ll_flags
&
LL_SBI_RMT_CLIENT
&&
is_root_inode
(
inode
))
{
inode
==
inode
->
i_sb
->
s_root
->
d_inode
)
{
struct
ll_file_data
*
fd
=
LUSTRE_FPRIVATE
(
file
);
struct
ll_file_data
*
fd
=
LUSTRE_FPRIVATE
(
file
);
LASSERT
(
fd
!=
NULL
);
LASSERT
(
fd
!=
NULL
);
...
...
drivers/staging/lustre/lustre/llite/file.c
浏览文件 @
f76c23da
...
@@ -341,8 +341,7 @@ int ll_file_release(struct inode *inode, struct file *file)
...
@@ -341,8 +341,7 @@ int ll_file_release(struct inode *inode, struct file *file)
inode
->
i_generation
,
inode
);
inode
->
i_generation
,
inode
);
#ifdef CONFIG_FS_POSIX_ACL
#ifdef CONFIG_FS_POSIX_ACL
if
(
sbi
->
ll_flags
&
LL_SBI_RMT_CLIENT
&&
if
(
sbi
->
ll_flags
&
LL_SBI_RMT_CLIENT
&&
is_root_inode
(
inode
))
{
inode
==
inode
->
i_sb
->
s_root
->
d_inode
)
{
struct
ll_file_data
*
fd
=
LUSTRE_FPRIVATE
(
file
);
struct
ll_file_data
*
fd
=
LUSTRE_FPRIVATE
(
file
);
LASSERT
(
fd
!=
NULL
);
LASSERT
(
fd
!=
NULL
);
...
@@ -354,7 +353,7 @@ int ll_file_release(struct inode *inode, struct file *file)
...
@@ -354,7 +353,7 @@ int ll_file_release(struct inode *inode, struct file *file)
}
}
#endif
#endif
if
(
inode
->
i_sb
->
s_root
!=
file
->
f_dentry
)
if
(
!
is_root_inode
(
inode
)
)
ll_stats_ops_tally
(
sbi
,
LPROC_LL_RELEASE
,
1
);
ll_stats_ops_tally
(
sbi
,
LPROC_LL_RELEASE
,
1
);
fd
=
LUSTRE_FPRIVATE
(
file
);
fd
=
LUSTRE_FPRIVATE
(
file
);
LASSERT
(
fd
!=
NULL
);
LASSERT
(
fd
!=
NULL
);
...
@@ -366,7 +365,7 @@ int ll_file_release(struct inode *inode, struct file *file)
...
@@ -366,7 +365,7 @@ int ll_file_release(struct inode *inode, struct file *file)
lli
->
lli_opendir_pid
!=
0
)
lli
->
lli_opendir_pid
!=
0
)
ll_stop_statahead
(
inode
,
lli
->
lli_opendir_key
);
ll_stop_statahead
(
inode
,
lli
->
lli_opendir_key
);
if
(
i
node
->
i_sb
->
s_root
==
file
->
f_dentry
)
{
if
(
i
s_root_inode
(
inode
)
)
{
LUSTRE_FPRIVATE
(
file
)
=
NULL
;
LUSTRE_FPRIVATE
(
file
)
=
NULL
;
ll_file_data_put
(
fd
);
ll_file_data_put
(
fd
);
return
0
;
return
0
;
...
@@ -562,7 +561,7 @@ int ll_file_open(struct inode *inode, struct file *file)
...
@@ -562,7 +561,7 @@ int ll_file_open(struct inode *inode, struct file *file)
spin_unlock
(
&
lli
->
lli_sa_lock
);
spin_unlock
(
&
lli
->
lli_sa_lock
);
}
}
if
(
i
node
->
i_sb
->
s_root
==
file
->
f_dentry
)
{
if
(
i
s_root_inode
(
inode
)
)
{
LUSTRE_FPRIVATE
(
file
)
=
fd
;
LUSTRE_FPRIVATE
(
file
)
=
fd
;
return
0
;
return
0
;
}
}
...
@@ -1636,7 +1635,7 @@ int ll_release_openhandle(struct inode *inode, struct lookup_intent *it)
...
@@ -1636,7 +1635,7 @@ int ll_release_openhandle(struct inode *inode, struct lookup_intent *it)
LASSERT
(
inode
);
LASSERT
(
inode
);
/* Root ? Do nothing. */
/* Root ? Do nothing. */
if
(
i
node
->
i_sb
->
s_root
->
d_inode
==
inode
)
if
(
i
s_root_inode
(
inode
)
)
return
0
;
return
0
;
/* No open handle to close? Move away */
/* No open handle to close? Move away */
...
@@ -3108,7 +3107,7 @@ int ll_inode_permission(struct inode *inode, int mask)
...
@@ -3108,7 +3107,7 @@ int ll_inode_permission(struct inode *inode, int mask)
/* as root inode are NOT getting validated in lookup operation,
/* as root inode are NOT getting validated in lookup operation,
* need to do it before permission check. */
* need to do it before permission check. */
if
(
i
node
==
inode
->
i_sb
->
s_root
->
d_inode
)
{
if
(
i
s_root_inode
(
inode
)
)
{
rc
=
__ll_inode_revalidate
(
inode
->
i_sb
->
s_root
,
rc
=
__ll_inode_revalidate
(
inode
->
i_sb
->
s_root
,
MDS_INODELOCK_LOOKUP
);
MDS_INODELOCK_LOOKUP
);
if
(
rc
)
if
(
rc
)
...
...
drivers/staging/lustre/lustre/llite/namei.c
浏览文件 @
f76c23da
...
@@ -264,7 +264,7 @@ int ll_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
...
@@ -264,7 +264,7 @@ int ll_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
if
((
bits
&
(
MDS_INODELOCK_LOOKUP
|
MDS_INODELOCK_PERM
))
&&
if
((
bits
&
(
MDS_INODELOCK_LOOKUP
|
MDS_INODELOCK_PERM
))
&&
inode
->
i_sb
->
s_root
!=
NULL
&&
inode
->
i_sb
->
s_root
!=
NULL
&&
i
node
!=
inode
->
i_sb
->
s_root
->
d_inode
)
i
s_root_inode
(
inode
)
)
ll_invalidate_aliases
(
inode
);
ll_invalidate_aliases
(
inode
);
iput
(
inode
);
iput
(
inode
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录