]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/fat/cache.c
fat: add i_disksize to represent uninitialized size
[karo-tx-linux.git] / fs / fat / cache.c
index 91ad9e1c94417a813c1661af830bc2ecbc962033..a132666920e66ef15a6d553406f9de03d6ec09fa 100644 (file)
@@ -329,10 +329,10 @@ int fat_bmap(struct inode *inode, sector_t sector, sector_t *phys,
                        return 0;
 
                /*
-                * ->mmu_private can access on only allocation path.
-                * (caller must hold ->i_mutex)
+                * Both ->mmu_private and ->i_disksize can access
+                * on only allocation path. (caller must hold ->i_mutex)
                 */
-               last_block = (MSDOS_I(inode)->mmu_private + (blocksize - 1))
+               last_block = (MSDOS_I(inode)->i_disksize + (blocksize - 1))
                        >> blocksize_bits;
                if (sector >= last_block)
                        return 0;