summaryrefslogtreecommitdiff
path: root/fs/ext2/namei.c
diff options
context:
space:
mode:
authorChengguang Xu <cgxu519@mykernel.net>2020-05-22 12:40:35 +0800
committerJan Kara <jack@suse.cz>2020-05-22 15:11:00 +0200
commit91a087153d9db2aaabd4fddcb3fa12fa10168136 (patch)
tree020095ca5ffeea66b5db312ca3d7c367c5a05c90 /fs/ext2/namei.c
parent8939a3af5c08daca7914c53d9f99c222569b6509 (diff)
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>
Diffstat (limited to 'fs/ext2/namei.c')
-rw-r--r--fs/ext2/namei.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c
index 1a5421a34ef7..ba3e3e075891 100644
--- a/fs/ext2/namei.c
+++ b/fs/ext2/namei.c
@@ -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,