summaryrefslogtreecommitdiffstats
path: root/fs/overlayfs/readdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/overlayfs/readdir.c')
-rw-r--r--fs/overlayfs/readdir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c
index 9b0078aabaf9..f8cc15533afa 100644
--- a/fs/overlayfs/readdir.c
+++ b/fs/overlayfs/readdir.c
@@ -863,6 +863,9 @@ static int ovl_dir_fsync(struct file *file, loff_t start, loff_t end,
if (!OVL_TYPE_UPPER(ovl_path_type(dentry)))
return 0;
+ if (!ovl_should_sync(OVL_FS(dentry->d_sb)))
+ return 0;
+
/*
* Need to check if we started out being a lower dir, but got copied up
*/