summaryrefslogtreecommitdiffstats
path: root/fs/ntfs/mft.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-10-04 14:08:53 +0200
committerAnton Altaparmakov <aia21@cantab.net>2005-10-04 14:08:53 +0200
commitc394e458b69632902d65f9e2f39df79314f72908 (patch)
tree562a5c51f5f87eeb98a39697d5b4c11e2c4c66e3 /fs/ntfs/mft.c
parentNTFS: Fix a stupid bug in __ntfs_bitmap_set_bits_in_run() which caused the (diff)
downloadlinux-c394e458b69632902d65f9e2f39df79314f72908.tar.xz
linux-c394e458b69632902d65f9e2f39df79314f72908.zip
NTFS: Fix a 64-bitness bug where a left-shift could overflow a 32-bit variable
which we now cast to 64-bit first (fs/ntfs/mft.c::map_mft_record_page(). Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Diffstat (limited to 'fs/ntfs/mft.c')
-rw-r--r--fs/ntfs/mft.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c
index 247586d1d5dc..b011369b5956 100644
--- a/fs/ntfs/mft.c
+++ b/fs/ntfs/mft.c
@@ -58,7 +58,8 @@ static inline MFT_RECORD *map_mft_record_page(ntfs_inode *ni)
* overflowing the unsigned long, but I don't think we would ever get
* here if the volume was that big...
*/
- index = ni->mft_no << vol->mft_record_size_bits >> PAGE_CACHE_SHIFT;
+ index = (u64)ni->mft_no << vol->mft_record_size_bits >>
+ PAGE_CACHE_SHIFT;
ofs = (ni->mft_no << vol->mft_record_size_bits) & ~PAGE_CACHE_MASK;
i_size = i_size_read(mft_vi);