Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
7a77b15d
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,发现更多精彩内容 >>
提交
7a77b15d
编写于
6月 08, 2009
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
switch reiserfs to usual conventions for caching ACLs
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
e68888bc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
21 deletion
+16
-21
fs/reiserfs/super.c
fs/reiserfs/super.c
+6
-6
fs/reiserfs/xattr_acl.c
fs/reiserfs/xattr_acl.c
+8
-13
include/linux/reiserfs_acl.h
include/linux/reiserfs_acl.h
+2
-2
未找到文件。
fs/reiserfs/super.c
浏览文件 @
7a77b15d
...
...
@@ -530,8 +530,8 @@ static void init_once(void *foo)
INIT_LIST_HEAD
(
&
ei
->
i_prealloc_list
);
inode_init_once
(
&
ei
->
vfs_inode
);
#ifdef CONFIG_REISERFS_FS_POSIX_ACL
ei
->
i_acl_access
=
NULL
;
ei
->
i_acl_default
=
NULL
;
ei
->
i_acl_access
=
ACL_NOT_CACHED
;
ei
->
i_acl_default
=
ACL_NOT_CACHED
;
#endif
}
...
...
@@ -586,14 +586,14 @@ static void reiserfs_clear_inode(struct inode *inode)
struct
posix_acl
*
acl
;
acl
=
REISERFS_I
(
inode
)
->
i_acl_access
;
if
(
acl
&&
!
IS_ERR
(
acl
)
)
if
(
acl
&&
acl
!=
ACL_NOT_CACHED
)
posix_acl_release
(
acl
);
REISERFS_I
(
inode
)
->
i_acl_access
=
NULL
;
REISERFS_I
(
inode
)
->
i_acl_access
=
ACL_NOT_CACHED
;
acl
=
REISERFS_I
(
inode
)
->
i_acl_default
;
if
(
acl
&&
!
IS_ERR
(
acl
)
)
if
(
acl
&&
acl
!=
ACL_NOT_CACHED
)
posix_acl_release
(
acl
);
REISERFS_I
(
inode
)
->
i_acl_default
=
NULL
;
REISERFS_I
(
inode
)
->
i_acl_default
=
ACL_NOT_CACHED
;
}
#else
#define reiserfs_clear_inode NULL
...
...
fs/reiserfs/xattr_acl.c
浏览文件 @
7a77b15d
...
...
@@ -192,19 +192,19 @@ static inline void iset_acl(struct inode *inode, struct posix_acl **i_acl,
struct
posix_acl
*
acl
)
{
spin_lock
(
&
inode
->
i_lock
);
if
(
*
i_acl
!=
ERR_PTR
(
-
ENODATA
)
)
if
(
*
i_acl
!=
ACL_NOT_CACHED
)
posix_acl_release
(
*
i_acl
);
*
i_acl
=
acl
?
posix_acl_dup
(
acl
)
:
ERR_PTR
(
-
ENODATA
);
*
i_acl
=
posix_acl_dup
(
acl
);
spin_unlock
(
&
inode
->
i_lock
);
}
static
inline
struct
posix_acl
*
iget_acl
(
struct
inode
*
inode
,
struct
posix_acl
**
i_acl
)
{
struct
posix_acl
*
acl
=
ERR_PTR
(
-
ENODATA
)
;
struct
posix_acl
*
acl
=
ACL_NOT_CACHED
;
spin_lock
(
&
inode
->
i_lock
);
if
(
*
i_acl
!=
ERR_PTR
(
-
ENODATA
)
)
if
(
*
i_acl
!=
ACL_NOT_CACHED
)
acl
=
posix_acl_dup
(
*
i_acl
);
spin_unlock
(
&
inode
->
i_lock
);
...
...
@@ -239,15 +239,13 @@ struct posix_acl *reiserfs_get_acl(struct inode *inode, int type)
}
acl
=
iget_acl
(
inode
,
p_acl
);
if
(
acl
&&
!
IS_ERR
(
acl
)
)
if
(
acl
!=
ACL_NOT_CACHED
)
return
acl
;
else
if
(
PTR_ERR
(
acl
)
==
-
ENODATA
)
return
NULL
;
size
=
reiserfs_xattr_get
(
inode
,
name
,
NULL
,
0
);
if
(
size
<
0
)
{
if
(
size
==
-
ENODATA
||
size
==
-
ENOSYS
)
{
*
p_acl
=
ERR_PTR
(
-
ENODATA
)
;
*
p_acl
=
NULL
;
return
NULL
;
}
return
ERR_PTR
(
size
);
...
...
@@ -262,7 +260,7 @@ struct posix_acl *reiserfs_get_acl(struct inode *inode, int type)
/* This shouldn't actually happen as it should have
been caught above.. but just in case */
acl
=
NULL
;
*
p_acl
=
ERR_PTR
(
-
ENODATA
)
;
*
p_acl
=
acl
;
}
else
if
(
retval
<
0
)
{
acl
=
ERR_PTR
(
retval
);
}
else
{
...
...
@@ -379,11 +377,8 @@ reiserfs_inherit_default_acl(struct reiserfs_transaction_handle *th,
}
acl
=
reiserfs_get_acl
(
dir
,
ACL_TYPE_DEFAULT
);
if
(
IS_ERR
(
acl
))
{
if
(
PTR_ERR
(
acl
)
==
-
ENODATA
)
goto
apply_umask
;
if
(
IS_ERR
(
acl
))
return
PTR_ERR
(
acl
);
}
if
(
acl
)
{
struct
posix_acl
*
acl_copy
;
...
...
include/linux/reiserfs_acl.h
浏览文件 @
7a77b15d
...
...
@@ -58,12 +58,12 @@ extern struct xattr_handler reiserfs_posix_acl_access_handler;
static
inline
void
reiserfs_init_acl_access
(
struct
inode
*
inode
)
{
REISERFS_I
(
inode
)
->
i_acl_access
=
NULL
;
REISERFS_I
(
inode
)
->
i_acl_access
=
ACL_NOT_CACHED
;
}
static
inline
void
reiserfs_init_acl_default
(
struct
inode
*
inode
)
{
REISERFS_I
(
inode
)
->
i_acl_default
=
NULL
;
REISERFS_I
(
inode
)
->
i_acl_default
=
ACL_NOT_CACHED
;
}
#else
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录