[PATCH] fsync on unmounting root

From: Chris Mason (mason@suse.com)
Date: Thu Jan 04 2001 - 13:47:59 EST


Hi guys,

Looks like the prerelease, and at least test13 don't fsync the device when
someone does an unmount on /

mount -o remount works, just unmounting the root misses the fsync.

This patch works for me:

-chris

--- linux/fs/super.c.1 Thu Jan 4 13:38:55 2001
+++ linux/fs/super.c Thu Jan 4 13:38:39 2001
@@ -1031,8 +1031,12 @@
                  * we just try to remount it readonly.
                  */
                 mntput(mnt);
- if (!(sb->s_flags & MS_RDONLY))
+ if (!(sb->s_flags & MS_RDONLY)) {
+ shrink_dcache_sb(sb);
+ fsync_dev(sb->s_dev);
+ acct_auto_close(sb->s_dev);
                         retval = do_remount_sb(sb, MS_RDONLY, 0);
+ }
                 return retval;
         }
 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jan 07 2001 - 21:00:19 EST