summaryrefslogtreecommitdiffstats
path: root/fs/ntfs3
diff options
context:
space:
mode:
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2024-05-30 09:55:12 +0200
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2024-06-26 14:48:51 +0200
commita0dde5d7a58b6bf9184ef3d8c6e62275c3645584 (patch)
tree5e823e0f3caed2e8db7ba51d37e5d92e26511a6e /fs/ntfs3
parentfs/ntfs3: Replace inode_trylock with inode_lock (diff)
downloadlinux-a0dde5d7a58b6bf9184ef3d8c6e62275c3645584.tar.xz
linux-a0dde5d7a58b6bf9184ef3d8c6e62275c3645584.zip
fs/ntfs3: One more reason to mark inode bad
In addition to returning an error, mark the node as bad. Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs/ntfs3')
-rw-r--r--fs/ntfs3/frecord.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c
index 4822cfd6351c..c7ab8d6f3896 100644
--- a/fs/ntfs3/frecord.c
+++ b/fs/ntfs3/frecord.c
@@ -1601,8 +1601,10 @@ int ni_delete_all(struct ntfs_inode *ni)
asize = le32_to_cpu(attr->size);
roff = le16_to_cpu(attr->nres.run_off);
- if (roff > asize)
+ if (roff > asize) {
+ _ntfs_bad_inode(&ni->vfs_inode);
return -EINVAL;
+ }
/* run==1 means unpack and deallocate. */
run_unpack_ex(RUN_DEALLOCATE, sbi, ni->mi.rno, svcn, evcn, svcn,