Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
7126bc2e
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看板
提交
7126bc2e
编写于
8年前
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lustre: switch to use of ->d_init()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
1001354c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
18 addition
and
71 deletion
+18
-71
drivers/staging/lustre/lustre/llite/dcache.c
drivers/staging/lustre/lustre/llite/dcache.c
+7
-26
drivers/staging/lustre/lustre/llite/llite_internal.h
drivers/staging/lustre/lustre/llite/llite_internal.h
+3
-14
drivers/staging/lustre/lustre/llite/llite_nfs.c
drivers/staging/lustre/lustre/llite/llite_nfs.c
+6
-16
drivers/staging/lustre/lustre/llite/namei.c
drivers/staging/lustre/lustre/llite/namei.c
+1
-12
drivers/staging/lustre/lustre/llite/statahead.c
drivers/staging/lustre/lustre/llite/statahead.c
+1
-3
未找到文件。
drivers/staging/lustre/lustre/llite/dcache.c
浏览文件 @
7126bc2e
...
...
@@ -57,9 +57,6 @@ static void ll_release(struct dentry *de)
LASSERT
(
de
);
lld
=
ll_d2d
(
de
);
if
(
!
lld
)
/* NFS copies the de->d_op methods (bug 4655) */
return
;
if
(
lld
->
lld_it
)
{
ll_intent_release
(
lld
->
lld_it
);
kfree
(
lld
->
lld_it
);
...
...
@@ -126,30 +123,13 @@ static int ll_ddelete(const struct dentry *de)
return
0
;
}
int
ll_d_init
(
struct
dentry
*
de
)
static
int
ll_d_init
(
struct
dentry
*
de
)
{
CDEBUG
(
D_DENTRY
,
"ldd on dentry %pd (%p) parent %p inode %p refc %d
\n
"
,
de
,
de
,
de
->
d_parent
,
d_inode
(
de
),
d_count
(
de
));
if
(
!
de
->
d_fsdata
)
{
struct
ll_dentry_data
*
lld
;
lld
=
kzalloc
(
sizeof
(
*
lld
),
GFP_NOFS
);
if
(
likely
(
lld
))
{
spin_lock
(
&
de
->
d_lock
);
if
(
likely
(
!
de
->
d_fsdata
))
{
de
->
d_fsdata
=
lld
;
__d_lustre_invalidate
(
de
);
}
else
{
kfree
(
lld
);
}
spin_unlock
(
&
de
->
d_lock
);
}
else
{
return
-
ENOMEM
;
}
}
LASSERT
(
de
->
d_op
==
&
ll_d_ops
);
struct
ll_dentry_data
*
lld
=
kzalloc
(
sizeof
(
*
lld
),
GFP_KERNEL
);
if
(
unlikely
(
!
lld
))
return
-
ENOMEM
;
lld
->
lld_invalid
=
1
;
de
->
d_fsdata
=
lld
;
return
0
;
}
...
...
@@ -300,6 +280,7 @@ static int ll_revalidate_nd(struct dentry *dentry, unsigned int flags)
}
const
struct
dentry_operations
ll_d_ops
=
{
.
d_init
=
ll_d_init
,
.
d_revalidate
=
ll_revalidate_nd
,
.
d_release
=
ll_release
,
.
d_delete
=
ll_ddelete
,
...
...
This diff is collapsed.
Click to expand it.
drivers/staging/lustre/lustre/llite/llite_internal.h
浏览文件 @
7126bc2e
...
...
@@ -801,7 +801,6 @@ int ll_hsm_release(struct inode *inode);
/* llite/dcache.c */
int
ll_d_init
(
struct
dentry
*
de
);
extern
const
struct
dentry_operations
ll_d_ops
;
void
ll_intent_drop_lock
(
struct
lookup_intent
*
);
void
ll_intent_release
(
struct
lookup_intent
*
);
...
...
@@ -1189,7 +1188,7 @@ dentry_may_statahead(struct inode *dir, struct dentry *dentry)
* 'lld_sa_generation == lli->lli_sa_generation'.
*/
ldd
=
ll_d2d
(
dentry
);
if
(
ldd
&&
ldd
->
lld_sa_generation
==
lli
->
lli_sa_generation
)
if
(
ldd
->
lld_sa_generation
==
lli
->
lli_sa_generation
)
return
false
;
return
true
;
...
...
@@ -1317,17 +1316,7 @@ static inline void ll_set_lock_data(struct obd_export *exp, struct inode *inode,
static
inline
int
d_lustre_invalid
(
const
struct
dentry
*
dentry
)
{
struct
ll_dentry_data
*
lld
=
ll_d2d
(
dentry
);
return
!
lld
||
lld
->
lld_invalid
;
}
static
inline
void
__d_lustre_invalidate
(
struct
dentry
*
dentry
)
{
struct
ll_dentry_data
*
lld
=
ll_d2d
(
dentry
);
if
(
lld
)
lld
->
lld_invalid
=
1
;
return
ll_d2d
(
dentry
)
->
lld_invalid
;
}
/*
...
...
@@ -1343,7 +1332,7 @@ static inline void d_lustre_invalidate(struct dentry *dentry, int nested)
spin_lock_nested
(
&
dentry
->
d_lock
,
nested
?
DENTRY_D_LOCK_NESTED
:
DENTRY_D_LOCK_NORMAL
);
__d_lustre_invalidate
(
dentry
)
;
ll_d2d
(
dentry
)
->
lld_invalid
=
1
;
/*
* We should be careful about dentries created by d_obtain_alias().
* These dentries are not put in the dentry tree, instead they are
...
...
This diff is collapsed.
Click to expand it.
drivers/staging/lustre/lustre/llite/llite_nfs.c
浏览文件 @
7126bc2e
...
...
@@ -169,22 +169,12 @@ ll_iget_for_nfs(struct super_block *sb, struct lu_fid *fid, struct lu_fid *paren
/* N.B. d_obtain_alias() drops inode ref on error */
result
=
d_obtain_alias
(
inode
);
if
(
!
IS_ERR
(
result
))
{
int
rc
;
rc
=
ll_d_init
(
result
);
if
(
rc
<
0
)
{
dput
(
result
);
result
=
ERR_PTR
(
rc
);
}
else
{
struct
ll_dentry_data
*
ldd
=
ll_d2d
(
result
);
/*
* Need to signal to the ll_intent_file_open that
* we came from NFS and so opencache needs to be
* enabled for this one
*/
ldd
->
lld_nfs_dentry
=
1
;
}
/*
* Need to signal to the ll_intent_file_open that
* we came from NFS and so opencache needs to be
* enabled for this one
*/
ll_d2d
(
result
)
->
lld_nfs_dentry
=
1
;
}
return
result
;
...
...
This diff is collapsed.
Click to expand it.
drivers/staging/lustre/lustre/llite/namei.c
浏览文件 @
7126bc2e
...
...
@@ -395,17 +395,9 @@ static struct dentry *ll_find_alias(struct inode *inode, struct dentry *dentry)
*/
struct
dentry
*
ll_splice_alias
(
struct
inode
*
inode
,
struct
dentry
*
de
)
{
struct
dentry
*
new
;
int
rc
;
if
(
inode
)
{
new
=
ll_find_alias
(
inode
,
de
);
struct
dentry
*
new
=
ll_find_alias
(
inode
,
de
);
if
(
new
)
{
rc
=
ll_d_init
(
new
);
if
(
rc
<
0
)
{
dput
(
new
);
return
ERR_PTR
(
rc
);
}
d_move
(
new
,
de
);
iput
(
inode
);
CDEBUG
(
D_DENTRY
,
...
...
@@ -414,9 +406,6 @@ struct dentry *ll_splice_alias(struct inode *inode, struct dentry *de)
return
new
;
}
}
rc
=
ll_d_init
(
de
);
if
(
rc
<
0
)
return
ERR_PTR
(
rc
);
d_add
(
de
,
inode
);
CDEBUG
(
D_DENTRY
,
"Add dentry %p inode %p refc %d flags %#x
\n
"
,
de
,
d_inode
(
de
),
d_count
(
de
),
de
->
d_flags
);
...
...
This diff is collapsed.
Click to expand it.
drivers/staging/lustre/lustre/llite/statahead.c
浏览文件 @
7126bc2e
...
...
@@ -1513,9 +1513,7 @@ static int revalidate_statahead_dentry(struct inode *dir,
*/
ldd
=
ll_d2d
(
*
dentryp
);
lli
=
ll_i2info
(
dir
);
/* ldd can be NULL if llite lookup failed. */
if
(
ldd
)
ldd
->
lld_sa_generation
=
lli
->
lli_sa_generation
;
ldd
->
lld_sa_generation
=
lli
->
lli_sa_generation
;
sa_put
(
sai
,
entry
);
return
rc
;
}
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部