Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
d4bfe2f7
K
Kernel
项目概览
openeuler
/
Kernel
12 个月 前同步成功
通知
5
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d4bfe2f7
编写于
6月 08, 2009
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
switch ext4 to inode->i_acl
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
6582a0e6
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
10 addition
and
40 deletion
+10
-40
fs/ext4/acl.c
fs/ext4/acl.c
+10
-12
fs/ext4/acl.h
fs/ext4/acl.h
+0
-4
fs/ext4/ext4.h
fs/ext4/ext4.h
+0
-4
fs/ext4/inode.c
fs/ext4/inode.c
+0
-4
fs/ext4/super.c
fs/ext4/super.c
+0
-16
未找到文件。
fs/ext4/acl.c
浏览文件 @
d4bfe2f7
...
...
@@ -134,7 +134,7 @@ ext4_iget_acl(struct inode *inode, struct posix_acl **i_acl)
if
(
acl
)
{
spin_lock
(
&
inode
->
i_lock
);
acl
=
*
i_acl
;
if
(
acl
!=
EXT4_
ACL_NOT_CACHED
)
if
(
acl
!=
ACL_NOT_CACHED
)
acl
=
posix_acl_dup
(
acl
);
spin_unlock
(
&
inode
->
i_lock
);
}
...
...
@@ -147,7 +147,7 @@ ext4_iset_acl(struct inode *inode, struct posix_acl **i_acl,
struct
posix_acl
*
acl
)
{
spin_lock
(
&
inode
->
i_lock
);
if
(
*
i_acl
!=
EXT4_
ACL_NOT_CACHED
)
if
(
*
i_acl
!=
ACL_NOT_CACHED
)
posix_acl_release
(
*
i_acl
);
*
i_acl
=
posix_acl_dup
(
acl
);
spin_unlock
(
&
inode
->
i_lock
);
...
...
@@ -161,7 +161,6 @@ ext4_iset_acl(struct inode *inode, struct posix_acl **i_acl,
static
struct
posix_acl
*
ext4_get_acl
(
struct
inode
*
inode
,
int
type
)
{
struct
ext4_inode_info
*
ei
=
EXT4_I
(
inode
);
int
name_index
;
char
*
value
=
NULL
;
struct
posix_acl
*
acl
;
...
...
@@ -172,15 +171,15 @@ ext4_get_acl(struct inode *inode, int type)
switch
(
type
)
{
case
ACL_TYPE_ACCESS
:
acl
=
ext4_iget_acl
(
inode
,
&
ei
->
i_acl
);
if
(
acl
!=
EXT4_
ACL_NOT_CACHED
)
acl
=
ext4_iget_acl
(
inode
,
&
inode
->
i_acl
);
if
(
acl
!=
ACL_NOT_CACHED
)
return
acl
;
name_index
=
EXT4_XATTR_INDEX_POSIX_ACL_ACCESS
;
break
;
case
ACL_TYPE_DEFAULT
:
acl
=
ext4_iget_acl
(
inode
,
&
ei
->
i_default_acl
);
if
(
acl
!=
EXT4_
ACL_NOT_CACHED
)
acl
=
ext4_iget_acl
(
inode
,
&
inode
->
i_default_acl
);
if
(
acl
!=
ACL_NOT_CACHED
)
return
acl
;
name_index
=
EXT4_XATTR_INDEX_POSIX_ACL_DEFAULT
;
break
;
...
...
@@ -206,11 +205,11 @@ ext4_get_acl(struct inode *inode, int type)
if
(
!
IS_ERR
(
acl
))
{
switch
(
type
)
{
case
ACL_TYPE_ACCESS
:
ext4_iset_acl
(
inode
,
&
ei
->
i_acl
,
acl
);
ext4_iset_acl
(
inode
,
&
inode
->
i_acl
,
acl
);
break
;
case
ACL_TYPE_DEFAULT
:
ext4_iset_acl
(
inode
,
&
ei
->
i_default_acl
,
acl
);
ext4_iset_acl
(
inode
,
&
inode
->
i_default_acl
,
acl
);
break
;
}
}
...
...
@@ -226,7 +225,6 @@ static int
ext4_set_acl
(
handle_t
*
handle
,
struct
inode
*
inode
,
int
type
,
struct
posix_acl
*
acl
)
{
struct
ext4_inode_info
*
ei
=
EXT4_I
(
inode
);
int
name_index
;
void
*
value
=
NULL
;
size_t
size
=
0
;
...
...
@@ -274,11 +272,11 @@ ext4_set_acl(handle_t *handle, struct inode *inode, int type,
if
(
!
error
)
{
switch
(
type
)
{
case
ACL_TYPE_ACCESS
:
ext4_iset_acl
(
inode
,
&
ei
->
i_acl
,
acl
);
ext4_iset_acl
(
inode
,
&
inode
->
i_acl
,
acl
);
break
;
case
ACL_TYPE_DEFAULT
:
ext4_iset_acl
(
inode
,
&
ei
->
i_default_acl
,
acl
);
ext4_iset_acl
(
inode
,
&
inode
->
i_default_acl
,
acl
);
break
;
}
}
...
...
fs/ext4/acl.h
浏览文件 @
d4bfe2f7
...
...
@@ -53,10 +53,6 @@ static inline int ext4_acl_count(size_t size)
#ifdef CONFIG_EXT4_FS_POSIX_ACL
/* Value for inode->u.ext4_i.i_acl and inode->u.ext4_i.i_default_acl
if the ACL has not been cached */
#define EXT4_ACL_NOT_CACHED ((void *)-1)
/* acl.c */
extern
int
ext4_permission
(
struct
inode
*
,
int
);
extern
int
ext4_acl_chmod
(
struct
inode
*
);
...
...
fs/ext4/ext4.h
浏览文件 @
d4bfe2f7
...
...
@@ -595,10 +595,6 @@ struct ext4_inode_info {
*/
struct
rw_semaphore
xattr_sem
;
#endif
#ifdef CONFIG_EXT4_FS_POSIX_ACL
struct
posix_acl
*
i_acl
;
struct
posix_acl
*
i_default_acl
;
#endif
struct
list_head
i_orphan
;
/* unlinked but open inodes */
...
...
fs/ext4/inode.c
浏览文件 @
d4bfe2f7
...
...
@@ -4453,10 +4453,6 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
return
inode
;
ei
=
EXT4_I
(
inode
);
#ifdef CONFIG_EXT4_FS_POSIX_ACL
ei
->
i_acl
=
EXT4_ACL_NOT_CACHED
;
ei
->
i_default_acl
=
EXT4_ACL_NOT_CACHED
;
#endif
ret
=
__ext4_get_inode_loc
(
inode
,
&
iloc
,
0
);
if
(
ret
<
0
)
...
...
fs/ext4/super.c
浏览文件 @
d4bfe2f7
...
...
@@ -666,10 +666,6 @@ static struct inode *ext4_alloc_inode(struct super_block *sb)
if
(
!
ei
)
return
NULL
;
#ifdef CONFIG_EXT4_FS_POSIX_ACL
ei
->
i_acl
=
EXT4_ACL_NOT_CACHED
;
ei
->
i_default_acl
=
EXT4_ACL_NOT_CACHED
;
#endif
ei
->
vfs_inode
.
i_version
=
1
;
ei
->
vfs_inode
.
i_data
.
writeback_index
=
0
;
memset
(
&
ei
->
i_cached_extent
,
0
,
sizeof
(
struct
ext4_ext_cache
));
...
...
@@ -735,18 +731,6 @@ static void destroy_inodecache(void)
static
void
ext4_clear_inode
(
struct
inode
*
inode
)
{
#ifdef CONFIG_EXT4_FS_POSIX_ACL
if
(
EXT4_I
(
inode
)
->
i_acl
&&
EXT4_I
(
inode
)
->
i_acl
!=
EXT4_ACL_NOT_CACHED
)
{
posix_acl_release
(
EXT4_I
(
inode
)
->
i_acl
);
EXT4_I
(
inode
)
->
i_acl
=
EXT4_ACL_NOT_CACHED
;
}
if
(
EXT4_I
(
inode
)
->
i_default_acl
&&
EXT4_I
(
inode
)
->
i_default_acl
!=
EXT4_ACL_NOT_CACHED
)
{
posix_acl_release
(
EXT4_I
(
inode
)
->
i_default_acl
);
EXT4_I
(
inode
)
->
i_default_acl
=
EXT4_ACL_NOT_CACHED
;
}
#endif
ext4_discard_preallocations
(
inode
);
if
(
EXT4_JOURNAL
(
inode
))
jbd2_journal_release_jbd_inode
(
EXT4_SB
(
inode
->
i_sb
)
->
s_journal
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录