overlayfs: test fsync on merged directory
Test that calling fsync against a file using the merged directory does
not result in a crash nor fails unexpectedly.
This is motivated by a change in overlayfs that resulted in a crash
(invalid memory access) when the lower or upper directory belonged to
a btrfs file system. The overlayfs change came in commit
4bacc9c9234
(overlayfs: Make f_path always point to the overlay and f_inode to the
underlay). At the moment there are two patches in the linux-fsdevel
and linux-btrfs mailing lists to fix this problem:
* vfs: add file_dentry()
* Btrfs: fix crash/invalid memory access on fsync when using overlayfs
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>