Commit 9d401e5b authored by Anton Altaparmakov's avatar Anton Altaparmakov

NTFS: 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).
Signed-off-by: default avatarAnton Altaparmakov <aia21@cantab.net>
parent dbe84f1e
...@@ -134,6 +134,8 @@ ToDo/Notes: ...@@ -134,6 +134,8 @@ ToDo/Notes:
that resulted due to #includes and header file interdependencies. that resulted due to #includes and header file interdependencies.
- Simplify setup of i_mode in fs/ntfs/inode.c::ntfs_read_locked_inode(). - 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(). - 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. 2.1.20 - Fix two stupid bugs introduced in 2.1.18 release.
......
...@@ -302,8 +302,8 @@ MFT_RECORD *map_extent_mft_record(ntfs_inode *base_ni, MFT_REF mref, ...@@ -302,8 +302,8 @@ MFT_RECORD *map_extent_mft_record(ntfs_inode *base_ni, MFT_REF mref,
ntfs_clear_extent_inode(ni); ntfs_clear_extent_inode(ni);
goto map_err_out; goto map_err_out;
} }
/* Verify the sequence number. */ /* Verify the sequence number if it is present. */
if (unlikely(le16_to_cpu(m->sequence_number) != seq_no)) { if (seq_no && (le16_to_cpu(m->sequence_number) != seq_no)) {
ntfs_error(base_ni->vol->sb, "Found stale extent mft " ntfs_error(base_ni->vol->sb, "Found stale extent mft "
"reference! Corrupt file system. Run chkdsk."); "reference! Corrupt file system. Run chkdsk.");
destroy_ni = TRUE; destroy_ni = TRUE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment