From 606e423e43bac0c2f7b85b682eb1ddd2a634586e Mon Sep 17 00:00:00 2001 From: OGAWA Hirofumi Date: Mon, 28 Apr 2008 02:16:27 -0700 Subject: fat: Update free_clusters even if it is untrusted Currently, free_clusters is not updated until it is trusted, because Windows doesn't update it correctly. But if user is using FAT driver of Linux, it updates free_clusters correctly. Instead, this updates it even if it's untrusted, so if free_clustes is correct, now keep correct value. Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/msdos_fs.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/msdos_fs.h') diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index 81fb9bc53220..0bca157ddca5 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h @@ -233,6 +233,7 @@ struct msdos_sb_info { struct mutex fat_lock; unsigned int prev_free; /* previously allocated cluster number */ unsigned int free_clusters; /* -1 if undefined */ + unsigned int free_clus_valid; /* is free_clusters valid? */ struct fat_mount_options options; struct nls_table *nls_disk; /* Codepage used on disk */ struct nls_table *nls_io; /* Charset used for input and display */ -- cgit v1.2.3