patch-1.3.57 linux/fs/super.c
Next file: linux/include/asm-alpha/byteorder.h
Previous file: linux/fs/proc/root.c
Back to the patch index
Back to the overall index
- Lines: 66
- Date:
Tue Jan 9 12:26:53 1996
- Orig file:
v1.3.56/linux/fs/super.c
- Orig date:
Sat Dec 30 15:50:55 1995
diff -u --recursive --new-file v1.3.56/linux/fs/super.c linux/fs/super.c
@@ -9,6 +9,8 @@
* - umount systemcall
*
* GK 2/5/95 - Changed to support mounting the root fs via NFS
+ *
+ * Added kerneld support: Jacques Gelinas and Bjorn Ekwall
*/
#include <stdarg.h>
@@ -28,11 +30,14 @@
#include <asm/system.h>
#include <asm/segment.h>
#include <asm/bitops.h>
-
-extern struct file_operations * get_blkfops(unsigned int);
-extern struct file_operations * get_chrfops(unsigned int);
+#ifdef CONFIG_KERNELD
+#include <linux/kerneld.h>
+#endif
+
extern void wait_for_keypress(void);
+extern struct file_operations * get_blkfops(unsigned int major);
+extern void blkdev_release (struct inode *);
extern int root_mountflags;
@@ -278,11 +283,15 @@
if (!name)
return fs;
- while (fs) {
- if (!strcmp(name,fs->name))
- break;
- fs = fs->next;
+ for (fs = file_systems; fs && strcmp(fs->name, name); fs = fs->next)
+ ;
+#ifdef CONFIG_KERNELD
+ if (!fs && (request_module(name) == 0)) {
+ for (fs = file_systems; fs && strcmp(fs->name, name); fs = fs->next)
+ ;
}
+#endif
+
return fs;
}
@@ -525,7 +534,6 @@
kdev_t dev;
int retval;
struct inode dummy_inode;
- struct file_operations * fops;
if (!suser())
return -EPERM;
@@ -557,9 +565,7 @@
return -ENXIO;
}
if (!(retval = do_umount(dev)) && dev != ROOT_DEV) {
- fops = get_blkfops(MAJOR(dev));
- if (fops && fops->release)
- fops->release(inode,NULL);
+ blkdev_release (inode);
if (MAJOR(dev) == UNNAMED_MAJOR)
put_unnamed_dev(dev);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this