jffs2: Remove jffs2_{get,set,remove}xattr macros
When CONFIG_JFFS2_FS_XATTR is off, jffs2_xattr_handlers is defined as NULL. With sb->s_xattr == NULL, the generic_{get,set,remove}xattr functions produce the same result as setting the {get,set,remove}xattr inode operations to NULL, so there is no need for these macros. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
5d18cbf16c
commit
6966f842c0
@ -61,10 +61,10 @@ const struct inode_operations jffs2_dir_inode_operations =
|
|||||||
.get_acl = jffs2_get_acl,
|
.get_acl = jffs2_get_acl,
|
||||||
.set_acl = jffs2_set_acl,
|
.set_acl = jffs2_set_acl,
|
||||||
.setattr = jffs2_setattr,
|
.setattr = jffs2_setattr,
|
||||||
.setxattr = jffs2_setxattr,
|
.setxattr = generic_setxattr,
|
||||||
.getxattr = jffs2_getxattr,
|
.getxattr = generic_getxattr,
|
||||||
.listxattr = jffs2_listxattr,
|
.listxattr = jffs2_listxattr,
|
||||||
.removexattr = jffs2_removexattr
|
.removexattr = generic_removexattr
|
||||||
};
|
};
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
|
@ -66,10 +66,10 @@ const struct inode_operations jffs2_file_inode_operations =
|
|||||||
.get_acl = jffs2_get_acl,
|
.get_acl = jffs2_get_acl,
|
||||||
.set_acl = jffs2_set_acl,
|
.set_acl = jffs2_set_acl,
|
||||||
.setattr = jffs2_setattr,
|
.setattr = jffs2_setattr,
|
||||||
.setxattr = jffs2_setxattr,
|
.setxattr = generic_setxattr,
|
||||||
.getxattr = jffs2_getxattr,
|
.getxattr = generic_getxattr,
|
||||||
.listxattr = jffs2_listxattr,
|
.listxattr = jffs2_listxattr,
|
||||||
.removexattr = jffs2_removexattr
|
.removexattr = generic_removexattr
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct address_space_operations jffs2_file_address_operations =
|
const struct address_space_operations jffs2_file_address_operations =
|
||||||
|
@ -16,8 +16,8 @@ const struct inode_operations jffs2_symlink_inode_operations =
|
|||||||
.readlink = generic_readlink,
|
.readlink = generic_readlink,
|
||||||
.get_link = simple_get_link,
|
.get_link = simple_get_link,
|
||||||
.setattr = jffs2_setattr,
|
.setattr = jffs2_setattr,
|
||||||
.setxattr = jffs2_setxattr,
|
.setxattr = generic_setxattr,
|
||||||
.getxattr = jffs2_getxattr,
|
.getxattr = generic_getxattr,
|
||||||
.listxattr = jffs2_listxattr,
|
.listxattr = jffs2_listxattr,
|
||||||
.removexattr = jffs2_removexattr
|
.removexattr = generic_removexattr
|
||||||
};
|
};
|
||||||
|
@ -99,9 +99,6 @@ extern const struct xattr_handler jffs2_user_xattr_handler;
|
|||||||
extern const struct xattr_handler jffs2_trusted_xattr_handler;
|
extern const struct xattr_handler jffs2_trusted_xattr_handler;
|
||||||
|
|
||||||
extern ssize_t jffs2_listxattr(struct dentry *, char *, size_t);
|
extern ssize_t jffs2_listxattr(struct dentry *, char *, size_t);
|
||||||
#define jffs2_getxattr generic_getxattr
|
|
||||||
#define jffs2_setxattr generic_setxattr
|
|
||||||
#define jffs2_removexattr generic_removexattr
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@ -116,9 +113,6 @@ extern ssize_t jffs2_listxattr(struct dentry *, char *, size_t);
|
|||||||
|
|
||||||
#define jffs2_xattr_handlers NULL
|
#define jffs2_xattr_handlers NULL
|
||||||
#define jffs2_listxattr NULL
|
#define jffs2_listxattr NULL
|
||||||
#define jffs2_getxattr NULL
|
|
||||||
#define jffs2_setxattr NULL
|
|
||||||
#define jffs2_removexattr NULL
|
|
||||||
|
|
||||||
#endif /* CONFIG_JFFS2_FS_XATTR */
|
#endif /* CONFIG_JFFS2_FS_XATTR */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user