summaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-05-07 02:55:41 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-05-07 02:55:41 +0000
commitdcec8a13bf565e47942a1751a9cec21bec5648fe (patch)
tree548b69625b18cc2e88c3e68d0923be546c9ebb03 /fs/super.c
parent2e0f55e79c49509b7ff70ff1a10e1e9e90a3dfd4 (diff)
o Merge with Linux 2.1.99.
o Fix ancient bug in the ELF loader making ldd crash. o Fix ancient bug in the keyboard code for SGI, SNI and Jazz.
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/fs/super.c b/fs/super.c
index 50a6cb9a6..0433dd251 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -668,18 +668,26 @@ static int do_umount(kdev_t dev, int unmount_root)
if (retval)
goto out;
- /* Forget any inodes */
- if (invalidate_inodes(sb)) {
- printk("VFS: Busy inodes after unmount. "
- "Self-destruct in 5 seconds. Bye-bye..\n");
- }
-
if (sb->s_op) {
if (sb->s_op->write_super && sb->s_dirt)
sb->s_op->write_super(sb);
+ }
+
+ lock_super(sb);
+ if (sb->s_op) {
if (sb->s_op->put_super)
sb->s_op->put_super(sb);
}
+
+ /* Forget any remaining inodes */
+ if (invalidate_inodes(sb)) {
+ printk("VFS: Busy inodes after unmount. "
+ "Self-destruct in 5 seconds. Have a nice day...\n");
+ }
+
+ sb->s_dev = 0; /* Free the superblock */
+ unlock_super(sb);
+
remove_vfsmnt(dev);
out:
return retval;