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>
This commit is contained in:
Konstantin Komarov 2024-05-30 10:55:12 +03:00
parent 69505fe98f
commit a0dde5d7a5
No known key found for this signature in database
GPG Key ID: A9B0331F832407B6

View File

@ -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,