Skip to contentSkip to conversation

hfsplus: use xattr handlers for removexattr

PATCH In review Christoph Hellwig 2 participants 4 messages Jan 30, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hfsplus: use xattr handlers for removexattr

hfsplus was already using the handlers for get and set operations, and with the removal of can_set_xattr we've now allow operations that wouldn't otherwise be allowed.

With this we can also centralize the special-casing of the osx. attrs that don't have prefixes on disk in the osx xattr handlers.

fs/hfsplus/dir.c +1 -1
index 9ee6298..bdec665 100644
@@ -529,7 +529,7 @@ const struct inode_operations hfsplus_dir_inode_operations = {
 	.setxattr		= generic_setxattr,
 	.getxattr		= generic_getxattr,
 	.listxattr		= hfsplus_listxattr,
-	.removexattr		= hfsplus_removexattr,
+	.removexattr		= generic_removexattr,
 #ifdef CONFIG_HFSPLUS_FS_POSIX_ACL
 	.get_acl		= hfsplus_get_posix_acl,
 	.set_acl		= hfsplus_set_posix_acl,
fs/hfsplus/inode.c +1 -1
index 2e10993..83c9166 100644
@@ -390,7 +390,7 @@ static const struct inode_operations hfsplus_file_inode_operations = {
 	.setxattr	= generic_setxattr,
 	.getxattr	= generic_getxattr,
 	.listxattr	= hfsplus_listxattr,
-	.removexattr	= hfsplus_removexattr,
+	.removexattr	= generic_removexattr,
 #ifdef CONFIG_HFSPLUS_FS_POSIX_ACL
 	.get_acl	= hfsplus_get_posix_acl,
 	.set_acl	= hfsplus_set_posix_acl,
fs/hfsplus/xattr.c +17 -43

126 lines not on this page · raw message

fs/hfsplus/xattr.h +0 -2
index 9e21449..288530c 100644
@@ -40,8 +40,6 @@ static inline ssize_t hfsplus_getxattr(struct dentry *dentry,
 
 ssize_t hfsplus_listxattr(struct dentry *dentry, char *buffer, size_t size);
 
-int hfsplus_removexattr(struct dentry *dentry, const char *name);
-
 int hfsplus_init_security(struct inode *inode, struct inode *dir,
 				const struct qstr *qstr);
 
#1 lore raw

Hi Christoph,

Quoted 9 lines · Christoph Hellwig

hfsplus was already using the handlers for get and set operations, and with the removal of can_set_xattr we've now allow operations that wouldn't otherwise be allowed.

With this we can also centralize the special-casing of the osx. attrs that don't have prefixes on disk in the osx xattr handlers.

As I remember, we discussed this changes in the scope of big patchset. So, as far as I can judge, you simply decided to extract it in one patch. Am I correct?

But how is this change safe without generic part of code? Especially, for the case of "osx." prefix. Or, maybe, I missed some commits in the kernel?

Thanks,
Vyacheslav Dubeyko.

#2 lore raw
Quoted 3 lines · Vyacheslav Dubeyko

As I remember, we discussed this changes in the scope of big patchset. So, as far as I can judge, you simply decided to extract it in one patch. Am I correct?

Well, Al pulled in the earlier version of the patch, so we'll need this one as a fixup.

Quoted 3 lines

But how is this change safe without generic part of code? Especially, for the case of "osx." prefix. Or, maybe, I missed some commits in the kernel?

Yeah, the older version got merged via Al's tree.

maintainer Reviewed-by
#3 lore raw
Quoted 8 lines · Christoph Hellwig
Quoted 3 lines · Vyacheslav Dubeyko

As I remember, we discussed this changes in the scope of big patchset. So, as far as I can judge, you simply decided to extract it in one patch. Am I correct?

Well, Al pulled in the earlier version of the patch, so we'll need this one as a fixup.

Ok. I see.

This patch looks good for me.

Thanks,
Vyacheslav Dubeyko.

Quoted 9 lines
Quoted 3 lines

But how is this change safe without generic part of code? Especially, for the case of "osx." prefix. Or, maybe, I missed some commits in the kernel?

Yeah, the older version got merged via Al's tree.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html