summaryrefslogtreecommitdiff
path: root/fs/ntfs3/record.c
diff options
context:
space:
mode:
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2023-05-08 10:36:28 +0300
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2023-07-02 23:21:25 +0300
commite0f363a98830e8d7d70fbaf91c07ae0b7c57aafe (patch)
tree1a16cad1c2c291e23c131098b6828da40a3c8386 /fs/ntfs3/record.c
parentd6cd7cecfd5e4a189db97876c317d96ebca075fa (diff)
downloadlinux-e0f363a98830e8d7d70fbaf91c07ae0b7c57aafe.tar.xz
fs/ntfs3: Mark ntfs dirty when on-disk struct is corrupted
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs/ntfs3/record.c')
-rw-r--r--fs/ntfs3/record.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ntfs3/record.c b/fs/ntfs3/record.c
index 7060f784c2d7..7974ca35a15c 100644
--- a/fs/ntfs3/record.c
+++ b/fs/ntfs3/record.c
@@ -180,6 +180,12 @@ ok:
return 0;
out:
+ if (err == -E_NTFS_CORRUPT) {
+ ntfs_err(sbi->sb, "mft corrupted");
+ ntfs_set_state(sbi, NTFS_DIRTY_ERROR);
+ err = -EINVAL;
+ }
+
return err;
}