All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <mason@suse.com>
To: viro@math.psu.edu, linux-kernel@vger.kernel.org
Subject: [PATCH] fsync on unmounting root
Date: Thu, 04 Jan 2001 13:47:59 -0500	[thread overview]
Message-ID: <99660000.978634079@tiny> (raw)

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/

             reply	other threads:[~2001-01-04 18:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-04 18:47 Chris Mason [this message]
2001-01-04 18:58 ` [PATCH] fsync on unmounting root Alexander Viro
2001-01-04 19:27   ` Chris Mason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=99660000.978634079@tiny \
    --to=mason@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@math.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.