freeze/thaw of upper is all that is needed. Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> --- fs/overlayfs/super.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 6792bb7..0f8a9c8 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -160,6 +160,20 @@ static void ovl_put_super(struct super_block *sb) kfree(ufs); } +static int ovl_freeze(struct super_block *sb) +{ + struct ovl_fs *ufs = sb->s_fs_info; + + return ufs->upper_mnt ? freeze_super(ufs->upper_mnt->mnt_sb) : 0; +} + +static int ovl_unfreeze(struct super_block *sb) +{ + struct ovl_fs *ufs = sb->s_fs_info; + + return ufs->upper_mnt ? thaw_super(ufs->upper_mnt->mnt_sb) : 0; +} + /** * ovl_statfs * @sb: The overlayfs super block @@ -222,6 +236,8 @@ static int ovl_remount(struct super_block *sb, int *flags, char *data) static const struct super_operations ovl_super_operations = { .put_super = ovl_put_super, + .freeze_fs = ovl_freeze, + .unfreeze_fs = ovl_unfreeze, .statfs = ovl_statfs, .show_options = ovl_show_options, .remount_fs = ovl_remount, -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html