aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs/acl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jfs/acl.c')
-rw-r--r--fs/jfs/acl.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/jfs/acl.c b/fs/jfs/acl.c
index 8d2a9ab981d4..e892dab40c26 100644
--- a/fs/jfs/acl.c
+++ b/fs/jfs/acl.c
@@ -21,6 +21,7 @@
21#include <linux/sched.h> 21#include <linux/sched.h>
22#include <linux/fs.h> 22#include <linux/fs.h>
23#include <linux/quotaops.h> 23#include <linux/quotaops.h>
24#include <linux/posix_acl_xattr.h>
24#include "jfs_incore.h" 25#include "jfs_incore.h"
25#include "jfs_xattr.h" 26#include "jfs_xattr.h"
26#include "jfs_acl.h" 27#include "jfs_acl.h"
@@ -36,11 +37,11 @@ static struct posix_acl *jfs_get_acl(struct inode *inode, int type)
36 37
37 switch(type) { 38 switch(type) {
38 case ACL_TYPE_ACCESS: 39 case ACL_TYPE_ACCESS:
39 ea_name = XATTR_NAME_ACL_ACCESS; 40 ea_name = POSIX_ACL_XATTR_ACCESS;
40 p_acl = &ji->i_acl; 41 p_acl = &ji->i_acl;
41 break; 42 break;
42 case ACL_TYPE_DEFAULT: 43 case ACL_TYPE_DEFAULT:
43 ea_name = XATTR_NAME_ACL_DEFAULT; 44 ea_name = POSIX_ACL_XATTR_DEFAULT;
44 p_acl = &ji->i_default_acl; 45 p_acl = &ji->i_default_acl;
45 break; 46 break;
46 default: 47 default:
@@ -70,8 +71,7 @@ static struct posix_acl *jfs_get_acl(struct inode *inode, int type)
70 if (!IS_ERR(acl)) 71 if (!IS_ERR(acl))
71 *p_acl = posix_acl_dup(acl); 72 *p_acl = posix_acl_dup(acl);
72 } 73 }
73 if (value) 74 kfree(value);
74 kfree(value);
75 return acl; 75 return acl;
76} 76}
77 77
@@ -89,11 +89,11 @@ static int jfs_set_acl(struct inode *inode, int type, struct posix_acl *acl)
89 89
90 switch(type) { 90 switch(type) {
91 case ACL_TYPE_ACCESS: 91 case ACL_TYPE_ACCESS:
92 ea_name = XATTR_NAME_ACL_ACCESS; 92 ea_name = POSIX_ACL_XATTR_ACCESS;
93 p_acl = &ji->i_acl; 93 p_acl = &ji->i_acl;
94 break; 94 break;
95 case ACL_TYPE_DEFAULT: 95 case ACL_TYPE_DEFAULT:
96 ea_name = XATTR_NAME_ACL_DEFAULT; 96 ea_name = POSIX_ACL_XATTR_DEFAULT;
97 p_acl = &ji->i_default_acl; 97 p_acl = &ji->i_default_acl;
98 if (!S_ISDIR(inode->i_mode)) 98 if (!S_ISDIR(inode->i_mode))
99 return acl ? -EACCES : 0; 99 return acl ? -EACCES : 0;
@@ -102,7 +102,7 @@ static int jfs_set_acl(struct inode *inode, int type, struct posix_acl *acl)
102 return -EINVAL; 102 return -EINVAL;
103 } 103 }
104 if (acl) { 104 if (acl) {
105 size = xattr_acl_size(acl->a_count); 105 size = posix_acl_xattr_size(acl->a_count);
106 value = kmalloc(size, GFP_KERNEL); 106 value = kmalloc(size, GFP_KERNEL);
107 if (!value) 107 if (!value)
108 return -ENOMEM; 108 return -ENOMEM;
@@ -112,8 +112,7 @@ static int jfs_set_acl(struct inode *inode, int type, struct posix_acl *acl)
112 } 112 }
113 rc = __jfs_setxattr(inode, ea_name, value, size, 0); 113 rc = __jfs_setxattr(inode, ea_name, value, size, 0);
114out: 114out:
115 if (value) 115 kfree(value);
116 kfree(value);
117 116
118 if (!rc) { 117 if (!rc) {
119 if (*p_acl && (*p_acl != JFS_ACL_NOT_CACHED)) 118 if (*p_acl && (*p_acl != JFS_ACL_NOT_CACHED))