We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b817ca3 + 4e5dbe6 commit 4b9b151Copy full SHA for 4b9b151
1 file changed
fs/nova/snapshot.c
@@ -866,8 +866,8 @@ int nova_restore_snapshot_entry(struct super_block *sb,
866
goto out;
867
}
868
869
- if (epoch_id > sbi->s_epoch_id)
870
- sbi->s_epoch_id = epoch_id;
+ if (epoch_id >= sbi->s_epoch_id)
+ sbi->s_epoch_id = epoch_id + 1;
871
872
out:
873
nova_clear_nvmm_page(sb, entry, just_init);
@@ -963,7 +963,7 @@ int nova_create_snapshot(struct super_block *sb)
963
nova_set_vmas_readonly(sb);
964
965
sbi->nova_sb->s_wtime = cpu_to_le32(get_seconds());
966
- sbi->nova_sb->s_epoch_id = cpu_to_le64(epoch_id);
+ sbi->nova_sb->s_epoch_id = cpu_to_le64(epoch_id + 1);
967
nova_update_super_crc(sb);
968
969
nova_sync_super(sb);
0 commit comments