Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
5affd88a
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
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看板
提交
5affd88a
编写于
15年前
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
switch btrfs to inode->i_acl
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
290c263b
无相关合并请求
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
27 deletion
+9
-27
fs/btrfs/acl.c
fs/btrfs/acl.c
+7
-7
fs/btrfs/btrfs_inode.h
fs/btrfs/btrfs_inode.h
+0
-4
fs/btrfs/ctree.h
fs/btrfs/ctree.h
+0
-2
fs/btrfs/inode.c
fs/btrfs/inode.c
+2
-14
未找到文件。
fs/btrfs/acl.c
浏览文件 @
5affd88a
...
...
@@ -34,7 +34,7 @@ static void btrfs_update_cached_acl(struct inode *inode,
struct
posix_acl
*
acl
)
{
spin_lock
(
&
inode
->
i_lock
);
if
(
*
p_acl
&&
*
p_acl
!=
BTRFS_
ACL_NOT_CACHED
)
if
(
*
p_acl
&&
*
p_acl
!=
ACL_NOT_CACHED
)
posix_acl_release
(
*
p_acl
);
*
p_acl
=
posix_acl_dup
(
acl
);
spin_unlock
(
&
inode
->
i_lock
);
...
...
@@ -50,11 +50,11 @@ static struct posix_acl *btrfs_get_acl(struct inode *inode, int type)
switch
(
type
)
{
case
ACL_TYPE_ACCESS
:
name
=
POSIX_ACL_XATTR_ACCESS
;
p_acl
=
&
BTRFS_I
(
inode
)
->
i_acl
;
p_acl
=
&
inode
->
i_acl
;
break
;
case
ACL_TYPE_DEFAULT
:
name
=
POSIX_ACL_XATTR_DEFAULT
;
p_acl
=
&
BTRFS_I
(
inode
)
->
i_default_acl
;
p_acl
=
&
inode
->
i_default_acl
;
break
;
default:
return
ERR_PTR
(
-
EINVAL
);
...
...
@@ -67,11 +67,11 @@ static struct posix_acl *btrfs_get_acl(struct inode *inode, int type)
spin_lock
(
&
inode
->
i_lock
);
acl
=
*
p_acl
;
if
(
acl
!=
BTRFS_
ACL_NOT_CACHED
)
if
(
acl
!=
ACL_NOT_CACHED
)
acl
=
posix_acl_dup
(
acl
);
spin_unlock
(
&
inode
->
i_lock
);
if
(
acl
!=
BTRFS_
ACL_NOT_CACHED
)
if
(
acl
!=
ACL_NOT_CACHED
)
return
acl
;
size
=
__btrfs_getxattr
(
inode
,
name
,
""
,
0
);
...
...
@@ -141,13 +141,13 @@ static int btrfs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
ret
=
0
;
inode
->
i_mode
=
mode
;
name
=
POSIX_ACL_XATTR_ACCESS
;
p_acl
=
&
BTRFS_I
(
inode
)
->
i_acl
;
p_acl
=
&
inode
->
i_acl
;
break
;
case
ACL_TYPE_DEFAULT
:
if
(
!
S_ISDIR
(
inode
->
i_mode
))
return
acl
?
-
EINVAL
:
0
;
name
=
POSIX_ACL_XATTR_DEFAULT
;
p_acl
=
&
BTRFS_I
(
inode
)
->
i_default_acl
;
p_acl
=
&
inode
->
i_default_acl
;
break
;
default:
return
-
EINVAL
;
...
...
This diff is collapsed.
Click to expand it.
fs/btrfs/btrfs_inode.h
浏览文件 @
5affd88a
...
...
@@ -53,10 +53,6 @@ struct btrfs_inode {
/* used to order data wrt metadata */
struct
btrfs_ordered_inode_tree
ordered_tree
;
/* standard acl pointers */
struct
posix_acl
*
i_acl
;
struct
posix_acl
*
i_default_acl
;
/* for keeping track of orphaned inodes */
struct
list_head
i_orphan
;
...
...
This diff is collapsed.
Click to expand it.
fs/btrfs/ctree.h
浏览文件 @
5affd88a
...
...
@@ -41,8 +41,6 @@ struct btrfs_ordered_sum;
#define BTRFS_MAGIC "_BHRfS_M"
#define BTRFS_ACL_NOT_CACHED ((void *)-1)
#define BTRFS_MAX_LEVEL 8
#define BTRFS_COMPAT_EXTENT_TREE_V0
...
...
This diff is collapsed.
Click to expand it.
fs/btrfs/inode.c
浏览文件 @
5affd88a
...
...
@@ -2123,8 +2123,8 @@ static void btrfs_read_locked_inode(struct inode *inode)
*/
maybe_acls
=
acls_after_inode_item
(
leaf
,
path
->
slots
[
0
],
inode
->
i_ino
);
if
(
!
maybe_acls
)
{
BTRFS_I
(
inode
)
->
i_acl
=
NULL
;
BTRFS_I
(
inode
)
->
i_default_acl
=
NULL
;
inode
->
i_acl
=
NULL
;
inode
->
i_default_acl
=
NULL
;
}
BTRFS_I
(
inode
)
->
block_group
=
btrfs_find_block_group
(
root
,
0
,
...
...
@@ -3141,9 +3141,6 @@ static noinline void init_btrfs_i(struct inode *inode)
{
struct
btrfs_inode
*
bi
=
BTRFS_I
(
inode
);
bi
->
i_acl
=
BTRFS_ACL_NOT_CACHED
;
bi
->
i_default_acl
=
BTRFS_ACL_NOT_CACHED
;
bi
->
generation
=
0
;
bi
->
sequence
=
0
;
bi
->
last_trans
=
0
;
...
...
@@ -4640,8 +4637,6 @@ struct inode *btrfs_alloc_inode(struct super_block *sb)
ei
->
last_trans
=
0
;
ei
->
logged_trans
=
0
;
btrfs_ordered_inode_tree_init
(
&
ei
->
ordered_tree
);
ei
->
i_acl
=
BTRFS_ACL_NOT_CACHED
;
ei
->
i_default_acl
=
BTRFS_ACL_NOT_CACHED
;
INIT_LIST_HEAD
(
&
ei
->
i_orphan
);
INIT_LIST_HEAD
(
&
ei
->
ordered_operations
);
return
&
ei
->
vfs_inode
;
...
...
@@ -4655,13 +4650,6 @@ void btrfs_destroy_inode(struct inode *inode)
WARN_ON
(
!
list_empty
(
&
inode
->
i_dentry
));
WARN_ON
(
inode
->
i_data
.
nrpages
);
if
(
BTRFS_I
(
inode
)
->
i_acl
&&
BTRFS_I
(
inode
)
->
i_acl
!=
BTRFS_ACL_NOT_CACHED
)
posix_acl_release
(
BTRFS_I
(
inode
)
->
i_acl
);
if
(
BTRFS_I
(
inode
)
->
i_default_acl
&&
BTRFS_I
(
inode
)
->
i_default_acl
!=
BTRFS_ACL_NOT_CACHED
)
posix_acl_release
(
BTRFS_I
(
inode
)
->
i_default_acl
);
/*
* Make sure we're properly removed from the ordered operation
* lists.
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部