Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
05fc0790
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,发现更多精彩内容 >>
提交
05fc0790
编写于
6月 08, 2009
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
switch jfs to inode->i_acl
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
d4bfe2f7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
15 addition
and
41 deletion
+15
-41
fs/jfs/acl.c
fs/jfs/acl.c
+9
-13
fs/jfs/jfs_incore.h
fs/jfs/jfs_incore.h
+0
-6
fs/jfs/super.c
fs/jfs/super.c
+0
-16
fs/jfs/xattr.c
fs/jfs/xattr.c
+6
-6
未找到文件。
fs/jfs/acl.c
浏览文件 @
05fc0790
...
...
@@ -31,7 +31,6 @@ static struct posix_acl *jfs_get_acl(struct inode *inode, int type)
{
struct
posix_acl
*
acl
;
char
*
ea_name
;
struct
jfs_inode_info
*
ji
=
JFS_IP
(
inode
);
struct
posix_acl
**
p_acl
;
int
size
;
char
*
value
=
NULL
;
...
...
@@ -39,17 +38,17 @@ static struct posix_acl *jfs_get_acl(struct inode *inode, int type)
switch
(
type
)
{
case
ACL_TYPE_ACCESS
:
ea_name
=
POSIX_ACL_XATTR_ACCESS
;
p_acl
=
&
ji
->
i_acl
;
p_acl
=
&
inode
->
i_acl
;
break
;
case
ACL_TYPE_DEFAULT
:
ea_name
=
POSIX_ACL_XATTR_DEFAULT
;
p_acl
=
&
ji
->
i_default_acl
;
p_acl
=
&
inode
->
i_default_acl
;
break
;
default:
return
ERR_PTR
(
-
EINVAL
);
}
if
(
*
p_acl
!=
JFS_
ACL_NOT_CACHED
)
if
(
*
p_acl
!=
ACL_NOT_CACHED
)
return
posix_acl_dup
(
*
p_acl
);
size
=
__jfs_getxattr
(
inode
,
ea_name
,
NULL
,
0
);
...
...
@@ -80,7 +79,6 @@ static int jfs_set_acl(tid_t tid, struct inode *inode, int type,
struct
posix_acl
*
acl
)
{
char
*
ea_name
;
struct
jfs_inode_info
*
ji
=
JFS_IP
(
inode
);
struct
posix_acl
**
p_acl
;
int
rc
;
int
size
=
0
;
...
...
@@ -92,11 +90,11 @@ static int jfs_set_acl(tid_t tid, struct inode *inode, int type,
switch
(
type
)
{
case
ACL_TYPE_ACCESS
:
ea_name
=
POSIX_ACL_XATTR_ACCESS
;
p_acl
=
&
ji
->
i_acl
;
p_acl
=
&
inode
->
i_acl
;
break
;
case
ACL_TYPE_DEFAULT
:
ea_name
=
POSIX_ACL_XATTR_DEFAULT
;
p_acl
=
&
ji
->
i_default_acl
;
p_acl
=
&
inode
->
i_default_acl
;
if
(
!
S_ISDIR
(
inode
->
i_mode
))
return
acl
?
-
EACCES
:
0
;
break
;
...
...
@@ -117,7 +115,7 @@ static int jfs_set_acl(tid_t tid, struct inode *inode, int type,
kfree
(
value
);
if
(
!
rc
)
{
if
(
*
p_acl
&&
(
*
p_acl
!=
JFS_
ACL_NOT_CACHED
))
if
(
*
p_acl
&&
(
*
p_acl
!=
ACL_NOT_CACHED
))
posix_acl_release
(
*
p_acl
);
*
p_acl
=
posix_acl_dup
(
acl
);
}
...
...
@@ -126,17 +124,15 @@ static int jfs_set_acl(tid_t tid, struct inode *inode, int type,
static
int
jfs_check_acl
(
struct
inode
*
inode
,
int
mask
)
{
struct
jfs_inode_info
*
ji
=
JFS_IP
(
inode
);
if
(
ji
->
i_acl
==
JFS_ACL_NOT_CACHED
)
{
if
(
inode
->
i_acl
==
ACL_NOT_CACHED
)
{
struct
posix_acl
*
acl
=
jfs_get_acl
(
inode
,
ACL_TYPE_ACCESS
);
if
(
IS_ERR
(
acl
))
return
PTR_ERR
(
acl
);
posix_acl_release
(
acl
);
}
if
(
ji
->
i_acl
)
return
posix_acl_permission
(
inode
,
ji
->
i_acl
,
mask
);
if
(
inode
->
i_acl
)
return
posix_acl_permission
(
inode
,
inode
->
i_acl
,
mask
);
return
-
EAGAIN
;
}
...
...
fs/jfs/jfs_incore.h
浏览文件 @
05fc0790
...
...
@@ -74,10 +74,6 @@ struct jfs_inode_info {
/* xattr_sem allows us to access the xattrs without taking i_mutex */
struct
rw_semaphore
xattr_sem
;
lid_t
xtlid
;
/* lid of xtree lock on directory */
#ifdef CONFIG_JFS_POSIX_ACL
struct
posix_acl
*
i_acl
;
struct
posix_acl
*
i_default_acl
;
#endif
union
{
struct
{
xtpage_t
_xtroot
;
/* 288: xtree root */
...
...
@@ -107,8 +103,6 @@ struct jfs_inode_info {
#define i_inline u.link._inline
#define i_inline_ea u.link._inline_ea
#define JFS_ACL_NOT_CACHED ((void *)-1)
#define IREAD_LOCK(ip, subclass) \
down_read_nested(&JFS_IP(ip)->rdwrlock, subclass)
#define IREAD_UNLOCK(ip) up_read(&JFS_IP(ip)->rdwrlock)
...
...
fs/jfs/super.c
浏览文件 @
05fc0790
...
...
@@ -128,18 +128,6 @@ static void jfs_destroy_inode(struct inode *inode)
ji
->
active_ag
=
-
1
;
}
spin_unlock_irq
(
&
ji
->
ag_lock
);
#ifdef CONFIG_JFS_POSIX_ACL
if
(
ji
->
i_acl
!=
JFS_ACL_NOT_CACHED
)
{
posix_acl_release
(
ji
->
i_acl
);
ji
->
i_acl
=
JFS_ACL_NOT_CACHED
;
}
if
(
ji
->
i_default_acl
!=
JFS_ACL_NOT_CACHED
)
{
posix_acl_release
(
ji
->
i_default_acl
);
ji
->
i_default_acl
=
JFS_ACL_NOT_CACHED
;
}
#endif
kmem_cache_free
(
jfs_inode_cachep
,
ji
);
}
...
...
@@ -798,10 +786,6 @@ static void init_once(void *foo)
init_rwsem
(
&
jfs_ip
->
xattr_sem
);
spin_lock_init
(
&
jfs_ip
->
ag_lock
);
jfs_ip
->
active_ag
=
-
1
;
#ifdef CONFIG_JFS_POSIX_ACL
jfs_ip
->
i_acl
=
JFS_ACL_NOT_CACHED
;
jfs_ip
->
i_default_acl
=
JFS_ACL_NOT_CACHED
;
#endif
inode_init_once
(
&
jfs_ip
->
vfs_inode
);
}
...
...
fs/jfs/xattr.c
浏览文件 @
05fc0790
...
...
@@ -727,10 +727,10 @@ static int can_set_system_xattr(struct inode *inode, const char *name,
/*
* We're changing the ACL. Get rid of the cached one
*/
acl
=
JFS_IP
(
inode
)
->
i_acl
;
if
(
acl
!=
JFS_
ACL_NOT_CACHED
)
acl
=
inode
->
i_acl
;
if
(
acl
!=
ACL_NOT_CACHED
)
posix_acl_release
(
acl
);
JFS_IP
(
inode
)
->
i_acl
=
JFS_
ACL_NOT_CACHED
;
inode
->
i_acl
=
ACL_NOT_CACHED
;
return
0
;
}
else
if
(
strcmp
(
name
,
POSIX_ACL_XATTR_DEFAULT
)
==
0
)
{
...
...
@@ -746,10 +746,10 @@ static int can_set_system_xattr(struct inode *inode, const char *name,
/*
* We're changing the default ACL. Get rid of the cached one
*/
acl
=
JFS_IP
(
inode
)
->
i_default_acl
;
if
(
acl
&&
(
acl
!=
JFS_
ACL_NOT_CACHED
))
acl
=
inode
->
i_default_acl
;
if
(
acl
&&
(
acl
!=
ACL_NOT_CACHED
))
posix_acl_release
(
acl
);
JFS_IP
(
inode
)
->
i_default_acl
=
JFS_
ACL_NOT_CACHED
;
inode
->
i_default_acl
=
ACL_NOT_CACHED
;
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录