Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
06b16e9f
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
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看板
提交
06b16e9f
编写于
6月 08, 2009
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
switch shmem to inode->i_acl
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
281eede0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
36 deletion
+10
-36
include/linux/shmem_fs.h
include/linux/shmem_fs.h
+0
-8
mm/shmem.c
mm/shmem.c
+4
-5
mm/shmem_acl.c
mm/shmem_acl.c
+6
-23
未找到文件。
include/linux/shmem_fs.h
浏览文件 @
06b16e9f
...
...
@@ -19,10 +19,6 @@ struct shmem_inode_info {
swp_entry_t
i_direct
[
SHMEM_NR_DIRECT
];
/* first blocks */
struct
list_head
swaplist
;
/* chain of maybes on swap */
struct
inode
vfs_inode
;
#ifdef CONFIG_TMPFS_POSIX_ACL
struct
posix_acl
*
i_acl
;
struct
posix_acl
*
i_default_acl
;
#endif
};
struct
shmem_sb_info
{
...
...
@@ -45,7 +41,6 @@ static inline struct shmem_inode_info *SHMEM_I(struct inode *inode)
#ifdef CONFIG_TMPFS_POSIX_ACL
int
shmem_permission
(
struct
inode
*
,
int
);
int
shmem_acl_init
(
struct
inode
*
,
struct
inode
*
);
void
shmem_acl_destroy_inode
(
struct
inode
*
);
extern
struct
xattr_handler
shmem_xattr_acl_access_handler
;
extern
struct
xattr_handler
shmem_xattr_acl_default_handler
;
...
...
@@ -57,9 +52,6 @@ static inline int shmem_acl_init(struct inode *inode, struct inode *dir)
{
return
0
;
}
static
inline
void
shmem_acl_destroy_inode
(
struct
inode
*
inode
)
{
}
#endif
/* CONFIG_TMPFS_POSIX_ACL */
#endif
mm/shmem.c
浏览文件 @
06b16e9f
...
...
@@ -2379,6 +2379,10 @@ static struct inode *shmem_alloc_inode(struct super_block *sb)
p
=
(
struct
shmem_inode_info
*
)
kmem_cache_alloc
(
shmem_inode_cachep
,
GFP_KERNEL
);
if
(
!
p
)
return
NULL
;
#ifdef CONFIG_TMPFS_POSIX_ACL
p
->
vfs_inode
.
i_acl
=
NULL
;
p
->
vfs_inode
.
i_default_acl
=
NULL
;
#endif
return
&
p
->
vfs_inode
;
}
...
...
@@ -2388,7 +2392,6 @@ static void shmem_destroy_inode(struct inode *inode)
/* only struct inode is valid if it's an inline symlink */
mpol_free_shared_policy
(
&
SHMEM_I
(
inode
)
->
policy
);
}
shmem_acl_destroy_inode
(
inode
);
kmem_cache_free
(
shmem_inode_cachep
,
SHMEM_I
(
inode
));
}
...
...
@@ -2397,10 +2400,6 @@ static void init_once(void *foo)
struct
shmem_inode_info
*
p
=
(
struct
shmem_inode_info
*
)
foo
;
inode_init_once
(
&
p
->
vfs_inode
);
#ifdef CONFIG_TMPFS_POSIX_ACL
p
->
i_acl
=
NULL
;
p
->
i_default_acl
=
NULL
;
#endif
}
static
int
init_inodecache
(
void
)
...
...
mm/shmem_acl.c
浏览文件 @
06b16e9f
...
...
@@ -22,11 +22,11 @@ shmem_get_acl(struct inode *inode, int type)
spin_lock
(
&
inode
->
i_lock
);
switch
(
type
)
{
case
ACL_TYPE_ACCESS
:
acl
=
posix_acl_dup
(
SHMEM_I
(
inode
)
->
i_acl
);
acl
=
posix_acl_dup
(
inode
->
i_acl
);
break
;
case
ACL_TYPE_DEFAULT
:
acl
=
posix_acl_dup
(
SHMEM_I
(
inode
)
->
i_default_acl
);
acl
=
posix_acl_dup
(
inode
->
i_default_acl
);
break
;
}
spin_unlock
(
&
inode
->
i_lock
);
...
...
@@ -45,13 +45,13 @@ shmem_set_acl(struct inode *inode, int type, struct posix_acl *acl)
spin_lock
(
&
inode
->
i_lock
);
switch
(
type
)
{
case
ACL_TYPE_ACCESS
:
free
=
SHMEM_I
(
inode
)
->
i_acl
;
SHMEM_I
(
inode
)
->
i_acl
=
posix_acl_dup
(
acl
);
free
=
inode
->
i_acl
;
inode
->
i_acl
=
posix_acl_dup
(
acl
);
break
;
case
ACL_TYPE_DEFAULT
:
free
=
SHMEM_I
(
inode
)
->
i_default_acl
;
SHMEM_I
(
inode
)
->
i_default_acl
=
posix_acl_dup
(
acl
);
free
=
inode
->
i_default_acl
;
inode
->
i_default_acl
=
posix_acl_dup
(
acl
);
break
;
}
spin_unlock
(
&
inode
->
i_lock
);
...
...
@@ -154,23 +154,6 @@ shmem_acl_init(struct inode *inode, struct inode *dir)
return
generic_acl_init
(
inode
,
dir
,
&
shmem_acl_ops
);
}
/**
* shmem_acl_destroy_inode - destroy acls hanging off the in-memory inode
*
* This is done before destroying the actual inode.
*/
void
shmem_acl_destroy_inode
(
struct
inode
*
inode
)
{
if
(
SHMEM_I
(
inode
)
->
i_acl
)
posix_acl_release
(
SHMEM_I
(
inode
)
->
i_acl
);
SHMEM_I
(
inode
)
->
i_acl
=
NULL
;
if
(
SHMEM_I
(
inode
)
->
i_default_acl
)
posix_acl_release
(
SHMEM_I
(
inode
)
->
i_default_acl
);
SHMEM_I
(
inode
)
->
i_default_acl
=
NULL
;
}
/**
* shmem_check_acl - check_acl() callback for generic_permission()
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录