2009-10-02 23:21:11 +02:00
|
|
|
diff -Nurw util-linux-ng-2.16.orig/mount/umount.c util-linux-ng-2.16/mount/umount.c
|
|
|
|
--- util-linux-ng-2.16.orig/mount/umount.c 2009-07-04 01:20:06.000000000 +0200
|
|
|
|
+++ util-linux-ng-2.16/mount/umount.c 2009-09-29 14:50:44.000000000 +0200
|
|
|
|
@@ -361,6 +361,7 @@
|
2008-11-21 15:54:57 +01:00
|
|
|
umount_all (char *types, char *test_opts) {
|
|
|
|
struct mntentchn *mc, *hd;
|
|
|
|
int errors = 0;
|
|
|
|
+ int do_sync = 0;
|
|
|
|
|
|
|
|
hd = mtab_head();
|
2009-10-02 23:21:11 +02:00
|
|
|
if (!hd->prev)
|
|
|
|
@@ -370,9 +371,11 @@
|
2008-11-21 15:54:57 +01:00
|
|
|
&& matching_opts (mc->m.mnt_opts, test_opts)) {
|
|
|
|
errors |= umount_one (mc->m.mnt_fsname, mc->m.mnt_dir,
|
|
|
|
mc->m.mnt_type, mc->m.mnt_opts, mc);
|
2009-10-02 23:21:11 +02:00
|
|
|
+ do_sync = 1;
|
2008-11-21 15:54:57 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
+ if (do_sync)
|
2009-10-02 23:21:11 +02:00
|
|
|
sync ();
|
2008-11-21 15:54:57 +01:00
|
|
|
return errors;
|
|
|
|
}
|