record sequence number if it is specified (i.e. not zero).
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
that resulted due to #includes and header file interdependencies.
- Simplify setup of i_mode in fs/ntfs/inode.c::ntfs_read_locked_inode().
- Add helpers fs/ntfs/layout.h::MK_MREF() and MK_LE_MREF().
+ - Modify fs/ntfs/mft.c::map_extent_mft_record() to only verify the mft
+ record sequence number if it is specified (i.e. not zero).
2.1.20 - Fix two stupid bugs introduced in 2.1.18 release.
ntfs_clear_extent_inode(ni);
goto map_err_out;
}
- /* Verify the sequence number. */
- if (unlikely(le16_to_cpu(m->sequence_number) != seq_no)) {
+ /* Verify the sequence number if it is present. */
+ if (seq_no && (le16_to_cpu(m->sequence_number) != seq_no)) {
ntfs_error(base_ni->vol->sb, "Found stale extent mft "
"reference! Corrupt file system. Run chkdsk.");
destroy_ni = TRUE;