diff options
-rw-r--r-- | fs/hfsplus/xattr.c | 19 |
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, if (is_known_namespace(name)) return -EOPNOTSUPP; - return hfsplus_getxattr(dentry, name, buffer, size, - XATTR_MAC_OSX_PREFIX, XATTR_MAC_OSX_PREFIX_LEN); + /* + * osx is the namespace we use to indicate an unprefixed + * attribute on the filesystem (like the ones that OS X + * creates), so we pass the name through unmodified (after + * ensuring it doesn't conflict with another namespace). + */ + return __hfsplus_getxattr(dentry->d_inode, name, buffer, size); } static 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, if (is_known_namespace(name)) return -EOPNOTSUPP; - return hfsplus_setxattr(dentry, name, buffer, size, flags, - XATTR_MAC_OSX_PREFIX, - XATTR_MAC_OSX_PREFIX_LEN); + /* + * osx is the namespace we use to indicate an unprefixed + * attribute on the filesystem (like the ones that OS X + * creates), so we pass the name through unmodified (after + * ensuring it doesn't conflict with another namespace). + */ + return __hfsplus_setxattr(dentry->d_inode, name, buffer, size, flags); } static size_t hfsplus_osx_listxattr(struct dentry *dentry, char *list, |