aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/hfsplus/xattr.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/fs/hfsplus/xattr.c b/fs/hfsplus/xattr.c
index 8d62de0f4504..89f262d8fcd8 100644
--- a/fs/hfsplus/xattr.c
+++ b/fs/hfsplus/xattr.c
@@ -862,8 +862,13 @@ static int hfsplus_osx_getxattr(struct dentry *dentry, const char *name,
862 if (is_known_namespace(name)) 862 if (is_known_namespace(name))
863 return -EOPNOTSUPP; 863 return -EOPNOTSUPP;
864 864
865 return hfsplus_getxattr(dentry, name, buffer, size, 865 /*
866 XATTR_MAC_OSX_PREFIX, XATTR_MAC_OSX_PREFIX_LEN); 866 * osx is the namespace we use to indicate an unprefixed
867 * attribute on the filesystem (like the ones that OS X
868 * creates), so we pass the name through unmodified (after
869 * ensuring it doesn't conflict with another namespace).
870 */
871 return __hfsplus_getxattr(dentry->d_inode, name, buffer, size);
867} 872}
868 873
869static int hfsplus_osx_setxattr(struct dentry *dentry, const char *name, 874static int hfsplus_osx_setxattr(struct dentry *dentry, const char *name,
@@ -879,9 +884,13 @@ static int hfsplus_osx_setxattr(struct dentry *dentry, const char *name,
879 if (is_known_namespace(name)) 884 if (is_known_namespace(name))
880 return -EOPNOTSUPP; 885 return -EOPNOTSUPP;
881 886
882 return hfsplus_setxattr(dentry, name, buffer, size, flags, 887 /*
883 XATTR_MAC_OSX_PREFIX, 888 * osx is the namespace we use to indicate an unprefixed
884 XATTR_MAC_OSX_PREFIX_LEN); 889 * attribute on the filesystem (like the ones that OS X
890 * creates), so we pass the name through unmodified (after
891 * ensuring it doesn't conflict with another namespace).
892 */
893 return __hfsplus_setxattr(dentry->d_inode, name, buffer, size, flags);
885} 894}
886 895
887static size_t hfsplus_osx_listxattr(struct dentry *dentry, char *list, 896static size_t hfsplus_osx_listxattr(struct dentry *dentry, char *list,