diff options
| -rw-r--r-- | fs/jfs/xattr.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/jfs/xattr.c b/fs/jfs/xattr.c index 3bd5ee45f7b3..46325d5c34fc 100644 --- a/fs/jfs/xattr.c +++ b/fs/jfs/xattr.c | |||
| @@ -854,9 +854,6 @@ int jfs_setxattr(struct dentry *dentry, const char *name, const void *value, | |||
| 854 | int rc; | 854 | int rc; |
| 855 | tid_t tid; | 855 | tid_t tid; |
| 856 | 856 | ||
| 857 | if ((rc = can_set_xattr(inode, name, value, value_len))) | ||
| 858 | return rc; | ||
| 859 | |||
| 860 | /* | 857 | /* |
| 861 | * If this is a request for a synthetic attribute in the system.* | 858 | * If this is a request for a synthetic attribute in the system.* |
| 862 | * namespace use the generic infrastructure to resolve a handler | 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 | if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN)) | 862 | if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN)) |
| 866 | return generic_setxattr(dentry, name, value, value_len, flags); | 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 | if (value == NULL) { /* empty EA, do not remove */ | 868 | if (value == NULL) { /* empty EA, do not remove */ |
| 869 | value = ""; | 869 | value = ""; |
| 870 | value_len = 0; | 870 | value_len = 0; |
| @@ -1034,9 +1034,6 @@ int jfs_removexattr(struct dentry *dentry, const char *name) | |||
| 1034 | int rc; | 1034 | int rc; |
| 1035 | tid_t tid; | 1035 | tid_t tid; |
| 1036 | 1036 | ||
| 1037 | if ((rc = can_set_xattr(inode, name, NULL, 0))) | ||
| 1038 | return rc; | ||
| 1039 | |||
| 1040 | /* | 1037 | /* |
| 1041 | * If this is a request for a synthetic attribute in the system.* | 1038 | * If this is a request for a synthetic attribute in the system.* |
| 1042 | * namespace use the generic infrastructure to resolve a handler | 1039 | * namespace use the generic infrastructure to resolve a handler |
| @@ -1045,6 +1042,9 @@ int jfs_removexattr(struct dentry *dentry, const char *name) | |||
| 1045 | if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN)) | 1042 | if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN)) |
| 1046 | return generic_removexattr(dentry, name); | 1043 | return generic_removexattr(dentry, name); |
| 1047 | 1044 | ||
| 1045 | if ((rc = can_set_xattr(inode, name, NULL, 0))) | ||
| 1046 | return rc; | ||
| 1047 | |||
| 1048 | tid = txBegin(inode->i_sb, 0); | 1048 | tid = txBegin(inode->i_sb, 0); |
| 1049 | mutex_lock(&ji->commit_mutex); | 1049 | mutex_lock(&ji->commit_mutex); |
| 1050 | rc = __jfs_setxattr(tid, dentry->d_inode, name, NULL, 0, XATTR_REPLACE); | 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 | * attributes are handled directly. | 1061 | * attributes are handled directly. |
| 1062 | */ | 1062 | */ |
| 1063 | const struct xattr_handler *jfs_xattr_handlers[] = { | 1063 | const struct xattr_handler *jfs_xattr_handlers[] = { |
| 1064 | #ifdef JFS_POSIX_ACL | 1064 | #ifdef CONFIG_JFS_POSIX_ACL |
| 1065 | &posix_acl_access_xattr_handler, | 1065 | &posix_acl_access_xattr_handler, |
| 1066 | &posix_acl_default_xattr_handler, | 1066 | &posix_acl_default_xattr_handler, |
| 1067 | #endif | 1067 | #endif |
