]> git.hungrycats.org Git - linux/commitdiff
NTFS: Modify fs/ntfs/mft.c::map_extent_mft_record() to only verify the mft
authorAnton Altaparmakov <aia21@cantab.net>
Sat, 16 Oct 2004 00:55:57 +0000 (01:55 +0100)
committerAnton Altaparmakov <aia21@cantab.net>
Sat, 16 Oct 2004 00:55:57 +0000 (01:55 +0100)
      record sequence number if it is specified (i.e. not zero).

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
fs/ntfs/ChangeLog
fs/ntfs/mft.c

index e555cd1a34491a5facb543ef5e18b397eb43c538..13da1337fd851ecf9fb44e56a993d77d9e89889b 100644 (file)
@@ -134,6 +134,8 @@ ToDo/Notes:
          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.
 
index ea0bbedede2fbf82dce49fc5c421b1c3dbcda6f7..e3ff64fd8522cc7dec34d2aec347a8876d0ae991 100644 (file)
@@ -302,8 +302,8 @@ map_err_out:
                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;