Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.4.1-pre9 /fs/super.c

Filename:/fs/super.c
Lines Added:2
Lines Deleted:4
Also changed in: (Previous) 2.4.1-pre8  2.4.0-ac9  2.4.0-ac7  2.4.0-ac8  2.4.0-ac6  2.4.0-ac5 
(Following) 2.4.1-pre10  2.4.1-pre11  2.4.1-pre12  2.4.1  2.4.1-ac1  2.4.1-ac2 

Location
[  2.4.1-pre9
  [  fs
     o  super.c

Patch

diff -u --recursive --new-file v2.4.0/linux/fs/super.c linux/fs/super.c
--- v2.4.0/linux/fs/super.c   Fri Dec 29 14:18:42 2000
+++ linux/fs/super.c   Mon Jan 15 20:53:11 2001
@@ -54,6 +54,7 @@
 extern int root_mountflags;
 
 static int do_remount_sb(struct super_block *sb, int flags, char * data);
+static int do_remount(const char *dir, int flags, char * data);
 
 /* this is initialized in init/main.c */
 kdev_t ROOT_DEV;
@@ -1025,15 +1026,12 @@
     * call reboot(9). Then init(8) could umount root and exec /reboot.
     */
    if (mnt == current->fs->rootmnt && !umount_root) {
-      int retval = 0;
       /*
        * Special case for "unmounting" root ...
        * we just try to remount it readonly.
        */
       mntput(mnt);
-      if (!(sb->s_flags & MS_RDONLY))
-         retval = do_remount_sb(sb, MS_RDONLY, 0);
-      return retval;
+      return do_remount("/", MS_RDONLY, NULL);
    }
 
    spin_lock(&dcache_lock);


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.