@@ -854,9 +854,6 @@ int jfs_setxattr(struct dentry *dentry, const char *name, const void *value,
854
854
int rc ;
855
855
tid_t tid ;
856
856
857
- if ((rc = can_set_xattr (inode , name , value , value_len )))
858
- return rc ;
859
-
860
857
/*
861
858
* If this is a request for a synthetic attribute in the system.*
862
859
* namespace use the generic infrastructure to resolve a handler
@@ -865,6 +862,9 @@ int jfs_setxattr(struct dentry *dentry, const char *name, const void *value,
865
862
if (!strncmp (name , XATTR_SYSTEM_PREFIX , XATTR_SYSTEM_PREFIX_LEN ))
866
863
return generic_setxattr (dentry , name , value , value_len , flags );
867
864
865
+ if ((rc = can_set_xattr (inode , name , value , value_len )))
866
+ return rc ;
867
+
868
868
if (value == NULL ) { /* empty EA, do not remove */
869
869
value = "" ;
870
870
value_len = 0 ;
@@ -1034,9 +1034,6 @@ int jfs_removexattr(struct dentry *dentry, const char *name)
1034
1034
int rc ;
1035
1035
tid_t tid ;
1036
1036
1037
- if ((rc = can_set_xattr (inode , name , NULL , 0 )))
1038
- return rc ;
1039
-
1040
1037
/*
1041
1038
* If this is a request for a synthetic attribute in the system.*
1042
1039
* namespace use the generic infrastructure to resolve a handler
@@ -1045,6 +1042,9 @@ int jfs_removexattr(struct dentry *dentry, const char *name)
1045
1042
if (!strncmp (name , XATTR_SYSTEM_PREFIX , XATTR_SYSTEM_PREFIX_LEN ))
1046
1043
return generic_removexattr (dentry , name );
1047
1044
1045
+ if ((rc = can_set_xattr (inode , name , NULL , 0 )))
1046
+ return rc ;
1047
+
1048
1048
tid = txBegin (inode -> i_sb , 0 );
1049
1049
mutex_lock (& ji -> commit_mutex );
1050
1050
rc = __jfs_setxattr (tid , dentry -> d_inode , name , NULL , 0 , XATTR_REPLACE );
@@ -1061,7 +1061,7 @@ int jfs_removexattr(struct dentry *dentry, const char *name)
1061
1061
* attributes are handled directly.
1062
1062
*/
1063
1063
const struct xattr_handler * jfs_xattr_handlers [] = {
1064
- #ifdef JFS_POSIX_ACL
1064
+ #ifdef CONFIG_JFS_POSIX_ACL
1065
1065
& posix_acl_access_xattr_handler ,
1066
1066
& posix_acl_default_xattr_handler ,
1067
1067
#endif
0 commit comments