mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
ext2: code cleanup by removing ifdef macro surrounding
Define ext2_listxattr to NULL when CONFIG_EROFS_FS_XATTR is not enabled, then we can remove many ugly ifdef macros in the code. Link: https://lore.kernel.org/r/20200522044035.24190-2-cgxu519@mykernel.net Signed-off-by: Chengguang Xu <cgxu519@mykernel.net> Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
parent
8939a3af5c
commit
91a087153d
@ -196,9 +196,7 @@ const struct file_operations ext2_file_operations = {
|
||||
};
|
||||
|
||||
const struct inode_operations ext2_file_inode_operations = {
|
||||
#ifdef CONFIG_EXT2_FS_XATTR
|
||||
.listxattr = ext2_listxattr,
|
||||
#endif
|
||||
.getattr = ext2_getattr,
|
||||
.setattr = ext2_setattr,
|
||||
.get_acl = ext2_get_acl,
|
||||
|
@ -411,9 +411,7 @@ const struct inode_operations ext2_dir_inode_operations = {
|
||||
.rmdir = ext2_rmdir,
|
||||
.mknod = ext2_mknod,
|
||||
.rename = ext2_rename,
|
||||
#ifdef CONFIG_EXT2_FS_XATTR
|
||||
.listxattr = ext2_listxattr,
|
||||
#endif
|
||||
.getattr = ext2_getattr,
|
||||
.setattr = ext2_setattr,
|
||||
.get_acl = ext2_get_acl,
|
||||
@ -422,9 +420,7 @@ const struct inode_operations ext2_dir_inode_operations = {
|
||||
};
|
||||
|
||||
const struct inode_operations ext2_special_inode_operations = {
|
||||
#ifdef CONFIG_EXT2_FS_XATTR
|
||||
.listxattr = ext2_listxattr,
|
||||
#endif
|
||||
.getattr = ext2_getattr,
|
||||
.setattr = ext2_setattr,
|
||||
.get_acl = ext2_get_acl,
|
||||
|
@ -25,16 +25,12 @@ const struct inode_operations ext2_symlink_inode_operations = {
|
||||
.get_link = page_get_link,
|
||||
.getattr = ext2_getattr,
|
||||
.setattr = ext2_setattr,
|
||||
#ifdef CONFIG_EXT2_FS_XATTR
|
||||
.listxattr = ext2_listxattr,
|
||||
#endif
|
||||
};
|
||||
|
||||
const struct inode_operations ext2_fast_symlink_inode_operations = {
|
||||
.get_link = simple_get_link,
|
||||
.getattr = ext2_getattr,
|
||||
.setattr = ext2_setattr,
|
||||
#ifdef CONFIG_EXT2_FS_XATTR
|
||||
.listxattr = ext2_listxattr,
|
||||
#endif
|
||||
};
|
||||
|
@ -100,6 +100,7 @@ static inline void ext2_xattr_destroy_cache(struct mb_cache *cache)
|
||||
}
|
||||
|
||||
#define ext2_xattr_handlers NULL
|
||||
#define ext2_listxattr NULL
|
||||
|
||||
# endif /* CONFIG_EXT2_FS_XATTR */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user