fs/hfsplus: move xattr_name allocation in hfsplus_getxattr()

security/trusted/user/osx getxattr did the same
xattr_name initialization. Move that operation in hfsplus_getxattr().

Tested with security/trusted/user getfattr/setfattr

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Fabian Frederick
2015-04-16 12:46:58 -07:00
committed by Linus Torvalds
parent f01fa5fb35
commit a3cef4cd68
5 changed files with 38 additions and 67 deletions

View File

@@ -28,15 +28,11 @@ static inline int hfsplus_setxattr(struct dentry *dentry, const char *name,
}
ssize_t __hfsplus_getxattr(struct inode *inode, const char *name,
void *value, size_t size);
void *value, size_t size);
static inline ssize_t hfsplus_getxattr(struct dentry *dentry,
const char *name,
void *value,
size_t size)
{
return __hfsplus_getxattr(dentry->d_inode, name, value, size);
}
ssize_t hfsplus_getxattr(struct dentry *dentry, const char *name,
void *value, size_t size,
const char *prefix, size_t prefixlen);
ssize_t hfsplus_listxattr(struct dentry *dentry, char *buffer, size_t size);