Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
cf31c463
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看板
提交
cf31c463
编写于
7月 04, 2017
作者:
M
Miklos Szeredi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ovl: move redirect to ovl_inode
Signed-off-by:
N
Miklos Szeredi
<
mszeredi@redhat.com
>
上级
09d8b586
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
9 deletion
+9
-9
fs/overlayfs/namei.c
fs/overlayfs/namei.c
+2
-1
fs/overlayfs/ovl_entry.h
fs/overlayfs/ovl_entry.h
+1
-1
fs/overlayfs/super.c
fs/overlayfs/super.c
+2
-1
fs/overlayfs/util.c
fs/overlayfs/util.c
+4
-6
未找到文件。
fs/overlayfs/namei.c
浏览文件 @
cf31c463
...
...
@@ -435,7 +435,6 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
oe
->
opaque
=
upperopaque
;
oe
->
impure
=
upperimpure
;
oe
->
redirect
=
upperredirect
;
memcpy
(
oe
->
lowerstack
,
stack
,
sizeof
(
struct
path
)
*
ctr
);
dentry
->
d_fsdata
=
oe
;
...
...
@@ -444,6 +443,8 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
inode
=
ovl_get_inode
(
dentry
,
upperdentry
);
if
(
!
inode
)
goto
out_free_oe
;
OVL_I
(
inode
)
->
redirect
=
upperredirect
;
}
revert_creds
(
old_cred
);
...
...
fs/overlayfs/ovl_entry.h
浏览文件 @
cf31c463
...
...
@@ -40,7 +40,6 @@ struct ovl_entry {
union
{
struct
{
u64
version
;
const
char
*
redirect
;
bool
opaque
;
bool
impure
;
bool
copying
;
...
...
@@ -54,6 +53,7 @@ struct ovl_entry {
struct
ovl_entry
*
ovl_alloc_entry
(
unsigned
int
numlower
);
struct
ovl_inode
{
const
char
*
redirect
;
struct
inode
vfs_inode
;
struct
dentry
*
__upperdentry
;
struct
inode
*
lower
;
...
...
fs/overlayfs/super.c
浏览文件 @
cf31c463
...
...
@@ -41,7 +41,6 @@ static void ovl_dentry_release(struct dentry *dentry)
if
(
oe
)
{
unsigned
int
i
;
kfree
(
oe
->
redirect
);
for
(
i
=
0
;
i
<
oe
->
numlower
;
i
++
)
dput
(
oe
->
lowerstack
[
i
].
dentry
);
kfree_rcu
(
oe
,
rcu
);
...
...
@@ -170,6 +169,7 @@ static struct inode *ovl_alloc_inode(struct super_block *sb)
{
struct
ovl_inode
*
oi
=
kmem_cache_alloc
(
ovl_inode_cachep
,
GFP_KERNEL
);
oi
->
redirect
=
NULL
;
oi
->
__upperdentry
=
NULL
;
oi
->
lower
=
NULL
;
...
...
@@ -188,6 +188,7 @@ static void ovl_destroy_inode(struct inode *inode)
struct
ovl_inode
*
oi
=
OVL_I
(
inode
);
dput
(
oi
->
__upperdentry
);
kfree
(
oi
->
redirect
);
call_rcu
(
&
inode
->
i_rcu
,
ovl_i_callback
);
}
...
...
fs/overlayfs/util.c
浏览文件 @
cf31c463
...
...
@@ -206,17 +206,15 @@ bool ovl_redirect_dir(struct super_block *sb)
const
char
*
ovl_dentry_get_redirect
(
struct
dentry
*
dentry
)
{
struct
ovl_entry
*
oe
=
dentry
->
d_fsdata
;
return
oe
->
redirect
;
return
OVL_I
(
d_inode
(
dentry
))
->
redirect
;
}
void
ovl_dentry_set_redirect
(
struct
dentry
*
dentry
,
const
char
*
redirect
)
{
struct
ovl_
entry
*
oe
=
dentry
->
d_fsdata
;
struct
ovl_
inode
*
oi
=
OVL_I
(
d_inode
(
dentry
))
;
kfree
(
o
e
->
redirect
);
o
e
->
redirect
=
redirect
;
kfree
(
o
i
->
redirect
);
o
i
->
redirect
=
redirect
;
}
void
ovl_inode_init
(
struct
inode
*
inode
,
struct
dentry
*
upperdentry
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录