From: Petr Uzel Date: Fri, 21 May 2010 12:18:31 +0000 (+0200) Subject: umount: do not sync() as the kernel does it by itself X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff14168beedfc05598b77fe490bbbe347c4bf3cb;p=util-linux umount: do not sync() as the kernel does it by itself On Fri, May 21, 2010 at 08:00:09AM -0400, Christoph Hellwig wrote: > On Fri, May 21, 2010 at 01:55:17PM +0200, Petr Uzel wrote: > > SUSE-based distributions have the following patch for some time. More > > info here: https://bugzilla.novell.com/show_bug.cgi?id=447036 > > > > From the Novell bugzilla: > > > > > I cannot see any justification for that sync call at all so I'd > > > probably just remove it. Your > > > patch is possibly safer so maybe it should be used as is. > > > > > > So, does anybody know why/if the sync() is actually needed? > > It's not needed. The kernel performs a sync by itself. Thanks, Christoph. Signed-off-by: Petr Uzel --- diff --git a/mount/umount.c b/mount/umount.c index 6786ac57..75507b76 100644 --- a/mount/umount.c +++ b/mount/umount.c @@ -379,7 +379,6 @@ umount_all (char *types, char *test_opts) { } } - sync (); return errors; }