staging: exfat: fix fs_sync() calls.
authorValdis Klētnieks <valdis.kletnieks@vt.edu>
Wed, 2 Oct 2019 19:16:24 +0000 (15:16 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2019 08:17:51 +0000 (10:17 +0200)
commit8789f13ddc77723e9451548b984382605340899c
tree38d0fb44bcf8a1d62a7a200b3dd05274a7fdd6a1
parent7e6af677d82719ce5972b94bc7d9a4b5c8eddae0
staging: exfat: fix fs_sync() calls.

The majority of them were totally backwards.  Change the logic
so that if DELAYED_SYNC *isn't* in the config, we actually flush to disk
before flagging the file system as clean.

That leaves two calls in the DELAYED_SYNC case.  More detailed
analysis is needed to make sure that's what's really needed, or if other
call sites also need a fs_sync() call.  This patch is at least "less wrong"
than the code was, but further changes should be another patch.

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Link: https://lore.kernel.org/r/11092.1570043784@turing-police
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/exfat/exfat_super.c