Commit 7f705e0b authored by Anton Altaparmakov's avatar Anton Altaparmakov

super.c::parse_ntfs_boot_sector(): Correct the check for 64-bit clusters (Philipp Thomas)

parent 2028a1b2
...@@ -20,6 +20,11 @@ ToDo: ...@@ -20,6 +20,11 @@ ToDo:
sufficient for synchronisation here. We then just need to make sure sufficient for synchronisation here. We then just need to make sure
ntfs_readpage/writepage/truncate interoperate properly with us. ntfs_readpage/writepage/truncate interoperate properly with us.
2.1.3 - WIP.
- super.c::parse_ntfs_boot_sector(): Correct the check for 64-bit
clusters. (Philipp Thomas)
2.1.2 - Important bug fixes aleviating the hangs in statfs. 2.1.2 - Important bug fixes aleviating the hangs in statfs.
- Fix buggy free cluster and free inode determination logic. - Fix buggy free cluster and free inode determination logic.
......
...@@ -619,9 +619,8 @@ static BOOL parse_ntfs_boot_sector(ntfs_volume *vol, const NTFS_BOOT_SECTOR *b) ...@@ -619,9 +619,8 @@ static BOOL parse_ntfs_boot_sector(ntfs_volume *vol, const NTFS_BOOT_SECTOR *b)
* the same as it is much faster on 32-bit CPUs. * the same as it is much faster on 32-bit CPUs.
*/ */
ll = sle64_to_cpu(b->number_of_sectors) >> sectors_per_cluster_bits; ll = sle64_to_cpu(b->number_of_sectors) >> sectors_per_cluster_bits;
if ((u64)ll >= 1ULL << (sizeof(unsigned long) * 8)) { if ((u64)ll >= 1ULL << 32)) {
ntfs_error(vol->sb, "Cannot handle %i-bit clusters. Sorry.", ntfs_error(vol->sb, "Cannot handle 64-bit clusters. Sorry.");
sizeof(unsigned long) * 4);
return FALSE; return FALSE;
} }
vol->nr_clusters = ll; vol->nr_clusters = ll;
......
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