diff options
| -rw-r--r-- | fs/fat/inode.c | 2 | ||||
| -rw-r--r-- | fs/fat/misc.c | 2 | ||||
| -rw-r--r-- | include/linux/msdos_fs_sb.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 23837158cde2..c67e48817872 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -885,7 +885,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, 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; diff --git a/fs/fat/misc.c b/fs/fat/misc.c index c3a7785d8381..ab744357b815 100644 --- a/fs/fat/misc.c +++ b/fs/fat/misc.c @@ -74,7 +74,7 @@ void fat_clusters_flush(struct super_block *sb) } 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); } diff --git a/include/linux/msdos_fs_sb.h b/include/linux/msdos_fs_sb.h index 546458d82ece..26d64203f086 100644 --- a/include/linux/msdos_fs_sb.h +++ b/include/linux/msdos_fs_sb.h @@ -49,7 +49,7 @@ struct msdos_sb_info { 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 */ |
