Skip to content

Commit a0dde5d

Browse files
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 <[email protected]>
1 parent 69505fe commit a0dde5d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/ntfs3/frecord.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1601,8 +1601,10 @@ int ni_delete_all(struct ntfs_inode *ni)
16011601
asize = le32_to_cpu(attr->size);
16021602
roff = le16_to_cpu(attr->nres.run_off);
16031603

1604-
if (roff > asize)
1604+
if (roff > asize) {
1605+
_ntfs_bad_inode(&ni->vfs_inode);
16051606
return -EINVAL;
1607+
}
16061608

16071609
/* run==1 means unpack and deallocate. */
16081610
run_unpack_ex(RUN_DEALLOCATE, sbi, ni->mi.rno, svcn, evcn, svcn,

0 commit comments

Comments
 (0)