ovl: Sync upper dirty data when syncing overlayfs
authorChengguang Xu <cgxu@mykernel.net>
Wed, 29 Nov 2017 02:01:32 +0000 (10:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Aug 2018 05:50:43 +0000 (07:50 +0200)
commit6aaaca7b81e4929a43ac8c0a2a734b762467c60f
tree2c175c1199a975a4470f5a120e592885a4494315
parent21b5b5e80bcf3f873bf89e9d957a129ea1fdcf36
ovl: Sync upper dirty data when syncing overlayfs

commit e8d4bfe3a71537284a90561f77c85dea6c154369 upstream.

When executing filesystem sync or umount on overlayfs,
dirty data does not get synced as expected on upper filesystem.
This patch fixes sync filesystem method to keep data consistency
for overlayfs.

Signed-off-by: Chengguang Xu <cgxu@mykernel.net>
Fixes: e593b2bf513d ("ovl: properly implement sync_filesystem()")
Cc: <stable@vger.kernel.org> #4.11
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/overlayfs/super.c