From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
The -1 was documented as "there is no hint", so this patch uses -1 instead
of 0 for FAT32 fsinfo.
sbi->fat_length = CF_LE_W(b->fat_length);
sbi->root_cluster = 0;
sbi->free_clusters = -1; /* Don't know yet */
- sbi->prev_free = 0;
+ sbi->prev_free = -1;
if (!sbi->fat_length && b->fat32_length) {
struct fat_boot_fsinfo *fsinfo;
} else {
if (sbi->free_clusters != -1)
fsinfo->free_clusters = CF_LE_L(sbi->free_clusters);
- if (sbi->prev_free)
+ if (sbi->prev_free != -1)
fsinfo->next_cluster = CF_LE_L(sbi->prev_free);
mark_buffer_dirty(bh);
}
unsigned long root_cluster; /* first cluster of the root directory */
unsigned long fsinfo_sector; /* FAT32 fsinfo offset from start of disk */
struct semaphore fat_lock;
- int prev_free; /* previously returned free cluster number */
+ int prev_free; /* previously allocated cluster number */
int free_clusters; /* -1 if undefined */
struct fat_mount_options options;
struct nls_table *nls_disk; /* Codepage used on disk */