The patch titled Subject: coda: remove sysctl object from module when unused has been added to the -mm tree. Its filename is coda-remove-sysctl-object-from-module-when-unused.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/coda-remove-sysctl-object-from-module-when-unused.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/coda-remove-sysctl-object-from-module-when-unused.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Fabian Frederick <fabf@xxxxxxxxx> Subject: coda: remove sysctl object from module when unused Inspired by NFS sysctl process Link: http://lkml.kernel.org/r/9afcc2cd09490849b309786bbf47fef75de7f91c.1558117389.git.jaharkes@xxxxxxxxxx Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx> Signed-off-by: Jan Harkes <jaharkes@xxxxxxxxxx> Cc: Arnd Bergmann <arnd@xxxxxxxx> Cc: Colin Ian King <colin.king@xxxxxxxxxxxxx> Cc: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Cc: David Howells <dhowells@xxxxxxxxxx> Cc: Mikko Rapeli <mikko.rapeli@xxxxxx> Cc: Sam Protsenko <semen.protsenko@xxxxxxxxxx> Cc: Yann Droneaud <ydroneaud@xxxxxxxxxx> Cc: Zhouyang Jia <jiazhouyang09@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/coda/Makefile | 3 ++- fs/coda/coda_int.h | 10 ++++++++++ fs/coda/coda_linux.h | 4 ---- fs/coda/sysctl.c | 11 ----------- 4 files changed, 12 insertions(+), 16 deletions(-) --- a/fs/coda/coda_int.h~coda-remove-sysctl-object-from-module-when-unused +++ a/fs/coda/coda_int.h @@ -13,9 +13,19 @@ extern int coda_fake_statfs; void coda_destroy_inodecache(void); int __init coda_init_inodecache(void); int coda_fsync(struct file *coda_file, loff_t start, loff_t end, int datasync); + +#ifdef CONFIG_SYSCTL void coda_sysctl_init(void); void coda_sysctl_clean(void); +#else +static inline void coda_sysctl_init(void) +{ +} +static inline void coda_sysctl_clean(void) +{ +} +#endif #endif /* _CODA_INT_ */ --- a/fs/coda/coda_linux.h~coda-remove-sysctl-object-from-module-when-unused +++ a/fs/coda/coda_linux.h @@ -59,10 +59,6 @@ void coda_vattr_to_iattr(struct inode *, void coda_iattr_to_vattr(struct iattr *, struct coda_vattr *); unsigned short coda_flags_to_cflags(unsigned short); -/* sysctl.h */ -void coda_sysctl_init(void); -void coda_sysctl_clean(void); - /* inode to cnode access functions */ static inline struct coda_inode_info *ITOC(struct inode *inode) --- a/fs/coda/Makefile~coda-remove-sysctl-object-from-module-when-unused +++ a/fs/coda/Makefile @@ -5,7 +5,8 @@ obj-$(CONFIG_CODA_FS) += coda.o coda-objs := psdev.o cache.o cnode.o inode.o dir.o file.o upcall.o \ - coda_linux.o symlink.o pioctl.o sysctl.o + coda_linux.o symlink.o pioctl.o +coda-$(CONFIG_SYSCTL) += sysctl.o # If you want debugging output, please uncomment the following line. --- a/fs/coda/sysctl.c~coda-remove-sysctl-object-from-module-when-unused +++ a/fs/coda/sysctl.c @@ -12,7 +12,6 @@ #include "coda_int.h" -#ifdef CONFIG_SYSCTL static struct ctl_table_header *fs_table_header; static struct ctl_table coda_table[] = { @@ -62,13 +61,3 @@ void coda_sysctl_clean(void) fs_table_header = NULL; } } - -#else -void coda_sysctl_init(void) -{ -} - -void coda_sysctl_clean(void) -{ -} -#endif _ Patches currently in -mm which might be from fabf@xxxxxxxxx are coda-destroy-mutex-in-put_super.patch coda-use-size-for-stat.patch coda-add-__init-to-init_coda_psdev.patch coda-remove-sysctl-object-from-module-when-unused.patch coda-remove-sb-test-in-coda_fid_to_inode.patch coda-ftoc-validity-check-integration.patch