Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
6582a0e6
Commit
6582a0e6
authored
Jun 08, 2009
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch ext3 to inode->i_acl
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
5e78b435
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
40 deletions
+10
-40
fs/ext3/acl.c
fs/ext3/acl.c
+10
-12
fs/ext3/acl.h
fs/ext3/acl.h
+0
-4
fs/ext3/inode.c
fs/ext3/inode.c
+0
-4
fs/ext3/super.c
fs/ext3/super.c
+0
-16
include/linux/ext3_fs_i.h
include/linux/ext3_fs_i.h
+0
-4
No files found.
fs/ext3/acl.c
View file @
6582a0e6
...
...
@@ -134,7 +134,7 @@ ext3_iget_acl(struct inode *inode, struct posix_acl **i_acl)
if
(
acl
)
{
spin_lock
(
&
inode
->
i_lock
);
acl
=
*
i_acl
;
if
(
acl
!=
EXT3_
ACL_NOT_CACHED
)
if
(
acl
!=
ACL_NOT_CACHED
)
acl
=
posix_acl_dup
(
acl
);
spin_unlock
(
&
inode
->
i_lock
);
}
...
...
@@ -147,7 +147,7 @@ ext3_iset_acl(struct inode *inode, struct posix_acl **i_acl,
struct
posix_acl
*
acl
)
{
spin_lock
(
&
inode
->
i_lock
);
if
(
*
i_acl
!=
EXT3_
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 @@ ext3_iset_acl(struct inode *inode, struct posix_acl **i_acl,
static
struct
posix_acl
*
ext3_get_acl
(
struct
inode
*
inode
,
int
type
)
{
struct
ext3_inode_info
*
ei
=
EXT3_I
(
inode
);
int
name_index
;
char
*
value
=
NULL
;
struct
posix_acl
*
acl
;
...
...
@@ -172,15 +171,15 @@ ext3_get_acl(struct inode *inode, int type)
switch
(
type
)
{
case
ACL_TYPE_ACCESS
:
acl
=
ext3_iget_acl
(
inode
,
&
ei
->
i_acl
);
if
(
acl
!=
EXT3_
ACL_NOT_CACHED
)
acl
=
ext3_iget_acl
(
inode
,
&
inode
->
i_acl
);
if
(
acl
!=
ACL_NOT_CACHED
)
return
acl
;
name_index
=
EXT3_XATTR_INDEX_POSIX_ACL_ACCESS
;
break
;
case
ACL_TYPE_DEFAULT
:
acl
=
ext3_iget_acl
(
inode
,
&
ei
->
i_default_acl
);
if
(
acl
!=
EXT3_
ACL_NOT_CACHED
)
acl
=
ext3_iget_acl
(
inode
,
&
inode
->
i_default_acl
);
if
(
acl
!=
ACL_NOT_CACHED
)
return
acl
;
name_index
=
EXT3_XATTR_INDEX_POSIX_ACL_DEFAULT
;
break
;
...
...
@@ -206,11 +205,11 @@ ext3_get_acl(struct inode *inode, int type)
if
(
!
IS_ERR
(
acl
))
{
switch
(
type
)
{
case
ACL_TYPE_ACCESS
:
ext3_iset_acl
(
inode
,
&
ei
->
i_acl
,
acl
);
ext3_iset_acl
(
inode
,
&
inode
->
i_acl
,
acl
);
break
;
case
ACL_TYPE_DEFAULT
:
ext3_iset_acl
(
inode
,
&
ei
->
i_default_acl
,
acl
);
ext3_iset_acl
(
inode
,
&
inode
->
i_default_acl
,
acl
);
break
;
}
}
...
...
@@ -226,7 +225,6 @@ static int
ext3_set_acl
(
handle_t
*
handle
,
struct
inode
*
inode
,
int
type
,
struct
posix_acl
*
acl
)
{
struct
ext3_inode_info
*
ei
=
EXT3_I
(
inode
);
int
name_index
;
void
*
value
=
NULL
;
size_t
size
=
0
;
...
...
@@ -274,11 +272,11 @@ ext3_set_acl(handle_t *handle, struct inode *inode, int type,
if
(
!
error
)
{
switch
(
type
)
{
case
ACL_TYPE_ACCESS
:
ext3_iset_acl
(
inode
,
&
ei
->
i_acl
,
acl
);
ext3_iset_acl
(
inode
,
&
inode
->
i_acl
,
acl
);
break
;
case
ACL_TYPE_DEFAULT
:
ext3_iset_acl
(
inode
,
&
ei
->
i_default_acl
,
acl
);
ext3_iset_acl
(
inode
,
&
inode
->
i_default_acl
,
acl
);
break
;
}
}
...
...
fs/ext3/acl.h
View file @
6582a0e6
...
...
@@ -53,10 +53,6 @@ static inline int ext3_acl_count(size_t size)
#ifdef CONFIG_EXT3_FS_POSIX_ACL
/* Value for inode->u.ext3_i.i_acl and inode->u.ext3_i.i_default_acl
if the ACL has not been cached */
#define EXT3_ACL_NOT_CACHED ((void *)-1)
/* acl.c */
extern
int
ext3_permission
(
struct
inode
*
,
int
);
extern
int
ext3_acl_chmod
(
struct
inode
*
);
...
...
fs/ext3/inode.c
View file @
6582a0e6
...
...
@@ -2752,10 +2752,6 @@ struct inode *ext3_iget(struct super_block *sb, unsigned long ino)
return
inode
;
ei
=
EXT3_I
(
inode
);
#ifdef CONFIG_EXT3_FS_POSIX_ACL
ei
->
i_acl
=
EXT3_ACL_NOT_CACHED
;
ei
->
i_default_acl
=
EXT3_ACL_NOT_CACHED
;
#endif
ei
->
i_block_alloc_info
=
NULL
;
ret
=
__ext3_get_inode_loc
(
inode
,
&
iloc
,
0
);
...
...
fs/ext3/super.c
View file @
6582a0e6
...
...
@@ -464,10 +464,6 @@ static struct inode *ext3_alloc_inode(struct super_block *sb)
ei
=
kmem_cache_alloc
(
ext3_inode_cachep
,
GFP_NOFS
);
if
(
!
ei
)
return
NULL
;
#ifdef CONFIG_EXT3_FS_POSIX_ACL
ei
->
i_acl
=
EXT3_ACL_NOT_CACHED
;
ei
->
i_default_acl
=
EXT3_ACL_NOT_CACHED
;
#endif
ei
->
i_block_alloc_info
=
NULL
;
ei
->
vfs_inode
.
i_version
=
1
;
return
&
ei
->
vfs_inode
;
...
...
@@ -518,18 +514,6 @@ static void destroy_inodecache(void)
static
void
ext3_clear_inode
(
struct
inode
*
inode
)
{
struct
ext3_block_alloc_info
*
rsv
=
EXT3_I
(
inode
)
->
i_block_alloc_info
;
#ifdef CONFIG_EXT3_FS_POSIX_ACL
if
(
EXT3_I
(
inode
)
->
i_acl
&&
EXT3_I
(
inode
)
->
i_acl
!=
EXT3_ACL_NOT_CACHED
)
{
posix_acl_release
(
EXT3_I
(
inode
)
->
i_acl
);
EXT3_I
(
inode
)
->
i_acl
=
EXT3_ACL_NOT_CACHED
;
}
if
(
EXT3_I
(
inode
)
->
i_default_acl
&&
EXT3_I
(
inode
)
->
i_default_acl
!=
EXT3_ACL_NOT_CACHED
)
{
posix_acl_release
(
EXT3_I
(
inode
)
->
i_default_acl
);
EXT3_I
(
inode
)
->
i_default_acl
=
EXT3_ACL_NOT_CACHED
;
}
#endif
ext3_discard_reservation
(
inode
);
EXT3_I
(
inode
)
->
i_block_alloc_info
=
NULL
;
if
(
unlikely
(
rsv
))
...
...
include/linux/ext3_fs_i.h
View file @
6582a0e6
...
...
@@ -103,10 +103,6 @@ struct ext3_inode_info {
*/
struct
rw_semaphore
xattr_sem
;
#endif
#ifdef CONFIG_EXT3_FS_POSIX_ACL
struct
posix_acl
*
i_acl
;
struct
posix_acl
*
i_default_acl
;
#endif
struct
list_head
i_orphan
;
/* unlinked but open inodes */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment