Skip to content

Commit ec2e6cb

Browse files
committed
Merge tag 'jfs-3.14-rc2' of git://github.com/kleikamp/linux-shaggy
Pull jfs fix from David Kleikamp: "Fix regression" * tag 'jfs-3.14-rc2' of git://github.com/kleikamp/linux-shaggy: jfs: fix generic posix ACL regression
2 parents 1ccfe6f + c18f7b5 commit ec2e6cb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

fs/jfs/xattr.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -854,9 +854,6 @@ int jfs_setxattr(struct dentry *dentry, const char *name, const void *value,
854854
int rc;
855855
tid_t tid;
856856

857-
if ((rc = can_set_xattr(inode, name, value, value_len)))
858-
return rc;
859-
860857
/*
861858
* If this is a request for a synthetic attribute in the system.*
862859
* 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,
865862
if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN))
866863
return generic_setxattr(dentry, name, value, value_len, flags);
867864

865+
if ((rc = can_set_xattr(inode, name, value, value_len)))
866+
return rc;
867+
868868
if (value == NULL) { /* empty EA, do not remove */
869869
value = "";
870870
value_len = 0;
@@ -1034,9 +1034,6 @@ int jfs_removexattr(struct dentry *dentry, const char *name)
10341034
int rc;
10351035
tid_t tid;
10361036

1037-
if ((rc = can_set_xattr(inode, name, NULL, 0)))
1038-
return rc;
1039-
10401037
/*
10411038
* If this is a request for a synthetic attribute in the system.*
10421039
* namespace use the generic infrastructure to resolve a handler
@@ -1045,6 +1042,9 @@ int jfs_removexattr(struct dentry *dentry, const char *name)
10451042
if (!strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN))
10461043
return generic_removexattr(dentry, name);
10471044

1045+
if ((rc = can_set_xattr(inode, name, NULL, 0)))
1046+
return rc;
1047+
10481048
tid = txBegin(inode->i_sb, 0);
10491049
mutex_lock(&ji->commit_mutex);
10501050
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)
10611061
* attributes are handled directly.
10621062
*/
10631063
const struct xattr_handler *jfs_xattr_handlers[] = {
1064-
#ifdef JFS_POSIX_ACL
1064+
#ifdef CONFIG_JFS_POSIX_ACL
10651065
&posix_acl_access_xattr_handler,
10661066
&posix_acl_default_xattr_handler,
10671067
#endif

0 commit comments

Comments
 (0)