linux-stable/fs/fat
Hou Tao 33440c22a7 fs/fat/file.c: issue flush after the writeback of FAT
[ Upstream commit bd8309de0d ]

fsync() needs to make sure the data & meta-data of file are persistent
after the return of fsync(), even when a power-failure occurs later.  In
the case of fat-fs, the FAT belongs to the meta-data of file, so we need
to issue a flush after the writeback of FAT instead before.

Also bail out early when any stage of fsync fails.

Link: http://lkml.kernel.org/r/20190409030158.136316-1-houtao1@huawei.com
Signed-off-by: Hou Tao <houtao1@huawei.com>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-06-15 11:54:51 +02:00
..
Kconfig fat: add config option to set UTF-8 mount option by default 2016-03-22 15:36:02 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cache.c fat: validate ->i_start before using 2018-09-15 09:45:27 +02:00
dir.c fs: Replace CURRENT_TIME_SEC with current_time() for inode timestamps 2016-09-27 21:06:22 -04:00
fat.h fat: validate ->i_start before using 2018-09-15 09:45:27 +02:00
fatent.c fs/fat/fatent.c: add cond_resched() to fat_count_free_clusters() 2018-11-04 14:52:47 +01:00
file.c fs/fat/file.c: issue flush after the writeback of FAT 2019-06-15 11:54:51 +02:00
inode.c fat: fix memory allocation failure handling of match_strdup() 2018-07-25 11:25:07 +02:00
misc.c VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb) 2017-07-17 08:45:34 +01:00
namei_msdos.c Merge remote-tracking branch 'ovl/rename2' into for-linus 2016-10-10 23:02:51 -04:00
namei_vfat.c vfat: deduplicate hex2bin() 2017-09-08 18:26:50 -07:00
nfs.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00