patch-2.1.23 linux/fs/filesystems.c
Next file: linux/fs/hpfs/hpfs_fs.c
Previous file: linux/fs/fcntl.c
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
Sun Jan 26 12:07:44 1997
- Orig file:
v2.1.22/linux/fs/filesystems.c
- Orig date:
Wed Jan 15 19:45:43 1997
diff -u --recursive --new-file v2.1.22/linux/fs/filesystems.c linux/fs/filesystems.c
@@ -24,17 +24,22 @@
#include <linux/ufs_fs.h>
#include <linux/romfs_fs.h>
#include <linux/major.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
extern void device_setup(void);
extern void binfmt_setup(void);
+extern void free_initmem(void);
/* This may be used only once, enforced by 'static int callable' */
asmlinkage int sys_setup(void)
{
static int callable = 1;
+ int err = -1;
+ lock_kernel();
if (!callable)
- return -1;
+ goto out;
callable = 0;
device_setup();
@@ -106,6 +111,12 @@
#endif
mount_root();
- return 0;
+
+ free_initmem();
+
+ err = 0;
+out:
+ unlock_kernel();
+ return err;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov