diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-11 16:32:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-11 16:32:10 -0500 |
commit | ddf1d6238dd13a3bd948e8fcb1109798ef0af49b (patch) | |
tree | daa25447e4b791b2868a0338f872975ec480862b /fs/hfsplus | |
parent | 32fb378437a1d716e72a442237d7ead1f435ecf0 (diff) | |
parent | 764a5c6b1fa4306dd7573c1d80914254909cd036 (diff) |
Merge branch 'work.xattr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs xattr updates from Al Viro:
"Andreas' xattr cleanup series.
It's a followup to his xattr work that went in last cycle; -0.5KLoC"
* 'work.xattr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
xattr handlers: Simplify list operation
ocfs2: Replace list xattr handler operations
nfs: Move call to security_inode_listsecurity into nfs_listxattr
xfs: Change how listxattr generates synthetic attributes
tmpfs: listxattr should include POSIX ACL xattrs
tmpfs: Use xattr handler infrastructure
btrfs: Use xattr handler infrastructure
vfs: Distinguish between full xattr names and proper prefixes
posix acls: Remove duplicate xattr name definitions
gfs2: Remove gfs2_xattr_acl_chmod
vfs: Remove vfs_xattr_cmp
Diffstat (limited to 'fs/hfsplus')
-rw-r--r-- | fs/hfsplus/posix_acl.c | 8 | ||||
-rw-r--r-- | fs/hfsplus/xattr.c | 12 |
2 files changed, 4 insertions, 16 deletions
diff --git a/fs/hfsplus/posix_acl.c b/fs/hfsplus/posix_acl.c index df0c9af68d05..afb33eda6d7d 100644 --- a/fs/hfsplus/posix_acl.c +++ b/fs/hfsplus/posix_acl.c | |||
@@ -21,10 +21,10 @@ struct posix_acl *hfsplus_get_posix_acl(struct inode *inode, int type) | |||
21 | 21 | ||
22 | switch (type) { | 22 | switch (type) { |
23 | case ACL_TYPE_ACCESS: | 23 | case ACL_TYPE_ACCESS: |
24 | xattr_name = POSIX_ACL_XATTR_ACCESS; | 24 | xattr_name = XATTR_NAME_POSIX_ACL_ACCESS; |
25 | break; | 25 | break; |
26 | case ACL_TYPE_DEFAULT: | 26 | case ACL_TYPE_DEFAULT: |
27 | xattr_name = POSIX_ACL_XATTR_DEFAULT; | 27 | xattr_name = XATTR_NAME_POSIX_ACL_DEFAULT; |
28 | break; | 28 | break; |
29 | default: | 29 | default: |
30 | return ERR_PTR(-EINVAL); | 30 | return ERR_PTR(-EINVAL); |
@@ -66,7 +66,7 @@ int hfsplus_set_posix_acl(struct inode *inode, struct posix_acl *acl, | |||
66 | 66 | ||
67 | switch (type) { | 67 | switch (type) { |
68 | case ACL_TYPE_ACCESS: | 68 | case ACL_TYPE_ACCESS: |
69 | xattr_name = POSIX_ACL_XATTR_ACCESS; | 69 | xattr_name = XATTR_NAME_POSIX_ACL_ACCESS; |
70 | if (acl) { | 70 | if (acl) { |
71 | err = posix_acl_equiv_mode(acl, &inode->i_mode); | 71 | err = posix_acl_equiv_mode(acl, &inode->i_mode); |
72 | if (err < 0) | 72 | if (err < 0) |
@@ -76,7 +76,7 @@ int hfsplus_set_posix_acl(struct inode *inode, struct posix_acl *acl, | |||
76 | break; | 76 | break; |
77 | 77 | ||
78 | case ACL_TYPE_DEFAULT: | 78 | case ACL_TYPE_DEFAULT: |
79 | xattr_name = POSIX_ACL_XATTR_DEFAULT; | 79 | xattr_name = XATTR_NAME_POSIX_ACL_DEFAULT; |
80 | if (!S_ISDIR(inode->i_mode)) | 80 | if (!S_ISDIR(inode->i_mode)) |
81 | return acl ? -EACCES : 0; | 81 | return acl ? -EACCES : 0; |
82 | break; | 82 | break; |
diff --git a/fs/hfsplus/xattr.c b/fs/hfsplus/xattr.c index e41a010cd89c..ab01530b4930 100644 --- a/fs/hfsplus/xattr.c +++ b/fs/hfsplus/xattr.c | |||
@@ -431,9 +431,6 @@ int hfsplus_setxattr(struct dentry *dentry, const char *name, | |||
431 | char *xattr_name; | 431 | char *xattr_name; |
432 | int res; | 432 | int res; |
433 | 433 | ||
434 | if (!strcmp(name, "")) | ||
435 | return -EINVAL; | ||
436 | |||
437 | xattr_name = kmalloc(NLS_MAX_CHARSET_SIZE * HFSPLUS_ATTR_MAX_STRLEN + 1, | 434 | xattr_name = kmalloc(NLS_MAX_CHARSET_SIZE * HFSPLUS_ATTR_MAX_STRLEN + 1, |
438 | GFP_KERNEL); | 435 | GFP_KERNEL); |
439 | if (!xattr_name) | 436 | if (!xattr_name) |
@@ -589,9 +586,6 @@ ssize_t hfsplus_getxattr(struct dentry *dentry, const char *name, | |||
589 | int res; | 586 | int res; |
590 | char *xattr_name; | 587 | char *xattr_name; |
591 | 588 | ||
592 | if (!strcmp(name, "")) | ||
593 | return -EINVAL; | ||
594 | |||
595 | xattr_name = kmalloc(NLS_MAX_CHARSET_SIZE * HFSPLUS_ATTR_MAX_STRLEN + 1, | 589 | xattr_name = kmalloc(NLS_MAX_CHARSET_SIZE * HFSPLUS_ATTR_MAX_STRLEN + 1, |
596 | GFP_KERNEL); | 590 | GFP_KERNEL); |
597 | if (!xattr_name) | 591 | if (!xattr_name) |
@@ -853,9 +847,6 @@ static int hfsplus_osx_getxattr(const struct xattr_handler *handler, | |||
853 | struct dentry *dentry, const char *name, | 847 | struct dentry *dentry, const char *name, |
854 | void *buffer, size_t size) | 848 | void *buffer, size_t size) |
855 | { | 849 | { |
856 | if (!strcmp(name, "")) | ||
857 | return -EINVAL; | ||
858 | |||
859 | /* | 850 | /* |
860 | * Don't allow retrieving properly prefixed attributes | 851 | * Don't allow retrieving properly prefixed attributes |
861 | * by prepending them with "osx." | 852 | * by prepending them with "osx." |
@@ -876,9 +867,6 @@ static int hfsplus_osx_setxattr(const struct xattr_handler *handler, | |||
876 | struct dentry *dentry, const char *name, | 867 | struct dentry *dentry, const char *name, |
877 | const void *buffer, size_t size, int flags) | 868 | const void *buffer, size_t size, int flags) |
878 | { | 869 | { |
879 | if (!strcmp(name, "")) | ||
880 | return -EINVAL; | ||
881 | |||
882 | /* | 870 | /* |
883 | * Don't allow setting properly prefixed attributes | 871 | * Don't allow setting properly prefixed attributes |
884 | * by prepending them with "osx." | 872 | * by prepending them with "osx." |