From b2a5082def730397f381dc5d0125c5889bd667fb Mon Sep 17 00:00:00 2001 From: Russell King Date: Wed, 3 Sep 2003 19:43:03 -0700 Subject: [PATCH] [PATCH] Don't #ifdef prototypes It seems that changing CONFIG_BLK_DEV_INITRD causes the whole kernel to rebuild due to an inappropriate ifdef in linux/fs.h - we should not conditionalise prototypes. In addition, real_root_dev is only used by two files (kernel/sysctl.c and init/do_mounts_initrd.c) so it makes even less sense that it was in linux/fs.h --- include/linux/fs.h | 4 ---- include/linux/initrd.h | 2 ++ kernel/sysctl.c | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 936f34c469dd3..87ae270bf96c7 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1391,10 +1391,6 @@ extern int simple_fill_super(struct super_block *, int, struct tree_descr *); extern int simple_pin_fs(char *name, struct vfsmount **mount, int *count); extern void simple_release_fs(struct vfsmount **mount, int *count); -#ifdef CONFIG_BLK_DEV_INITRD -extern unsigned int real_root_dev; -#endif - extern int inode_change_ok(struct inode *, struct iattr *); extern int inode_setattr(struct inode *, struct iattr *); diff --git a/include/linux/initrd.h b/include/linux/initrd.h index 32452d53dac3a..55289d261b4fa 100644 --- a/include/linux/initrd.h +++ b/include/linux/initrd.h @@ -16,3 +16,5 @@ extern int initrd_below_start_ok; /* free_initrd_mem always gets called with the next two as arguments.. */ extern unsigned long initrd_start, initrd_end; extern void free_initrd_mem(unsigned long, unsigned long); + +extern unsigned int real_root_dev; diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 142ccfcf835b9..3180fa00d248a 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #ifdef CONFIG_ROOT_NFS -- 2.53.0