Skip to content

Commit b579901

Browse files
committed
ext4: move sysfs code from super.c to fs/ext4/sysfs.c
Also statically allocate the ext4_kset and ext4_feat objects, since we only need exactly one of each, and it's simpler and less code if we drop the dynamic allocation and deallocation when it's not needed. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent 1f93e4a commit b579901

4 files changed

Lines changed: 410 additions & 410 deletions

File tree

‎fs/ext4/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ext4-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o page-io.o \
88
ioctl.o namei.o super.o symlink.o hash.o resize.o extents.o \
99
ext4_jbd2.o migrate.o mballoc.o block_validity.o move_extent.o \
1010
mmp.o indirect.o extents_status.o xattr.o xattr_user.o \
11-
xattr_trusted.o inline.o readpage.o
11+
xattr_trusted.o inline.o readpage.o sysfs.o
1212

1313
ext4-$(CONFIG_EXT4_FS_POSIX_ACL) += acl.o
1414
ext4-$(CONFIG_EXT4_FS_SECURITY) += xattr_security.o

‎fs/ext4/ext4.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2903,6 +2903,11 @@ extern const struct inode_operations ext4_encrypted_symlink_inode_operations;
29032903
extern const struct inode_operations ext4_symlink_inode_operations;
29042904
extern const struct inode_operations ext4_fast_symlink_inode_operations;
29052905

2906+
/* sysfs.c */
2907+
extern int ext4_register_sysfs(struct super_block *sb);
2908+
extern int __init ext4_init_sysfs(void);
2909+
extern void ext4_exit_sysfs(void);
2910+
29062911
/* block_validity */
29072912
extern void ext4_release_system_zone(struct super_block *sb);
29082913
extern int ext4_setup_system_zone(struct super_block *sb);

0 commit comments

Comments
 (0)