diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-08 19:56:00 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-24 08:17:06 -0400 |
commit | 06b16e9f68edaa1e71aee943d3c030bcf7380af1 (patch) | |
tree | fcdbc0302571e6cda4817869a377d7498a44f776 /mm/shmem_acl.c | |
parent | 281eede0328c84a8f20e0e85b807d5b51c3de4f2 (diff) |
switch shmem to inode->i_acl
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'mm/shmem_acl.c')
-rw-r--r-- | mm/shmem_acl.c | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/mm/shmem_acl.c b/mm/shmem_acl.c index 8e5aadd7dcd6..606a8e757a42 100644 --- a/mm/shmem_acl.c +++ b/mm/shmem_acl.c | |||
@@ -22,11 +22,11 @@ shmem_get_acl(struct inode *inode, int type) | |||
22 | spin_lock(&inode->i_lock); | 22 | spin_lock(&inode->i_lock); |
23 | switch(type) { | 23 | switch(type) { |
24 | case ACL_TYPE_ACCESS: | 24 | case ACL_TYPE_ACCESS: |
25 | acl = posix_acl_dup(SHMEM_I(inode)->i_acl); | 25 | acl = posix_acl_dup(inode->i_acl); |
26 | break; | 26 | break; |
27 | 27 | ||
28 | case ACL_TYPE_DEFAULT: | 28 | case ACL_TYPE_DEFAULT: |
29 | acl = posix_acl_dup(SHMEM_I(inode)->i_default_acl); | 29 | acl = posix_acl_dup(inode->i_default_acl); |
30 | break; | 30 | break; |
31 | } | 31 | } |
32 | spin_unlock(&inode->i_lock); | 32 | spin_unlock(&inode->i_lock); |
@@ -45,13 +45,13 @@ shmem_set_acl(struct inode *inode, int type, struct posix_acl *acl) | |||
45 | spin_lock(&inode->i_lock); | 45 | spin_lock(&inode->i_lock); |
46 | switch(type) { | 46 | switch(type) { |
47 | case ACL_TYPE_ACCESS: | 47 | case ACL_TYPE_ACCESS: |
48 | free = SHMEM_I(inode)->i_acl; | 48 | free = inode->i_acl; |
49 | SHMEM_I(inode)->i_acl = posix_acl_dup(acl); | 49 | inode->i_acl = posix_acl_dup(acl); |
50 | break; | 50 | break; |
51 | 51 | ||
52 | case ACL_TYPE_DEFAULT: | 52 | case ACL_TYPE_DEFAULT: |
53 | free = SHMEM_I(inode)->i_default_acl; | 53 | free = inode->i_default_acl; |
54 | SHMEM_I(inode)->i_default_acl = posix_acl_dup(acl); | 54 | inode->i_default_acl = posix_acl_dup(acl); |
55 | break; | 55 | break; |
56 | } | 56 | } |
57 | spin_unlock(&inode->i_lock); | 57 | spin_unlock(&inode->i_lock); |
@@ -155,23 +155,6 @@ shmem_acl_init(struct inode *inode, struct inode *dir) | |||
155 | } | 155 | } |
156 | 156 | ||
157 | /** | 157 | /** |
158 | * shmem_acl_destroy_inode - destroy acls hanging off the in-memory inode | ||
159 | * | ||
160 | * This is done before destroying the actual inode. | ||
161 | */ | ||
162 | |||
163 | void | ||
164 | shmem_acl_destroy_inode(struct inode *inode) | ||
165 | { | ||
166 | if (SHMEM_I(inode)->i_acl) | ||
167 | posix_acl_release(SHMEM_I(inode)->i_acl); | ||
168 | SHMEM_I(inode)->i_acl = NULL; | ||
169 | if (SHMEM_I(inode)->i_default_acl) | ||
170 | posix_acl_release(SHMEM_I(inode)->i_default_acl); | ||
171 | SHMEM_I(inode)->i_default_acl = NULL; | ||
172 | } | ||
173 | |||
174 | /** | ||
175 | * shmem_check_acl - check_acl() callback for generic_permission() | 158 | * shmem_check_acl - check_acl() callback for generic_permission() |
176 | */ | 159 | */ |
177 | static int | 160 | static int |