summaryrefslogtreecommitdiff
path: root/fs/ntfs3/index.c
diff options
context:
space:
mode:
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2023-05-08 11:36:28 +0400
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2023-07-03 00:21:25 +0400
commite0f363a98830e8d7d70fbaf91c07ae0b7c57aafe (patch)
tree1a16cad1c2c291e23c131098b6828da40a3c8386 /fs/ntfs3/index.c
parentd6cd7cecfd5e4a189db97876c317d96ebca075fa (diff)
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/index.c')
-rw-r--r--fs/ntfs3/index.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c
index 0a48d2d67219..b40da258e684 100644
--- a/fs/ntfs3/index.c
+++ b/fs/ntfs3/index.c
@@ -1113,6 +1113,12 @@ ok:
*node = in;
out:
+ if (err == -E_NTFS_CORRUPT) {
+ ntfs_inode_err(&ni->vfs_inode, "directory corrupted");
+ ntfs_set_state(ni->mi.sbi, NTFS_DIRTY_ERROR);
+ err = -EINVAL;
+ }
+
if (ib != in->index)
kfree(ib);