diff options
-rw-r--r-- | fs/fat/fatent.c | 6 | ||||
-rw-r--r-- | include/linux/msdos_fs.h | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/fs/fat/fatent.c b/fs/fat/fatent.c index a1a9e0451217..ab171ea8e869 100644 --- a/fs/fat/fatent.c +++ b/fs/fat/fatent.c | |||
@@ -267,19 +267,19 @@ static struct fatent_operations fat32_ops = { | |||
267 | 267 | ||
268 | static inline void lock_fat(struct msdos_sb_info *sbi) | 268 | static inline void lock_fat(struct msdos_sb_info *sbi) |
269 | { | 269 | { |
270 | down(&sbi->fat_lock); | 270 | mutex_lock(&sbi->fat_lock); |
271 | } | 271 | } |
272 | 272 | ||
273 | static inline void unlock_fat(struct msdos_sb_info *sbi) | 273 | static inline void unlock_fat(struct msdos_sb_info *sbi) |
274 | { | 274 | { |
275 | up(&sbi->fat_lock); | 275 | mutex_unlock(&sbi->fat_lock); |
276 | } | 276 | } |
277 | 277 | ||
278 | void fat_ent_access_init(struct super_block *sb) | 278 | void fat_ent_access_init(struct super_block *sb) |
279 | { | 279 | { |
280 | struct msdos_sb_info *sbi = MSDOS_SB(sb); | 280 | struct msdos_sb_info *sbi = MSDOS_SB(sb); |
281 | 281 | ||
282 | init_MUTEX(&sbi->fat_lock); | 282 | mutex_init(&sbi->fat_lock); |
283 | 283 | ||
284 | switch (sbi->fat_bits) { | 284 | switch (sbi->fat_bits) { |
285 | case 32: | 285 | case 32: |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index 8bcd9450d926..779e6a5744c7 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -184,6 +184,7 @@ struct fat_slot_info { | |||
184 | #include <linux/string.h> | 184 | #include <linux/string.h> |
185 | #include <linux/nls.h> | 185 | #include <linux/nls.h> |
186 | #include <linux/fs.h> | 186 | #include <linux/fs.h> |
187 | #include <linux/mutex.h> | ||
187 | 188 | ||
188 | struct fat_mount_options { | 189 | struct fat_mount_options { |
189 | uid_t fs_uid; | 190 | uid_t fs_uid; |
@@ -226,7 +227,7 @@ struct msdos_sb_info { | |||
226 | unsigned long max_cluster; /* maximum cluster number */ | 227 | unsigned long max_cluster; /* maximum cluster number */ |
227 | unsigned long root_cluster; /* first cluster of the root directory */ | 228 | unsigned long root_cluster; /* first cluster of the root directory */ |
228 | unsigned long fsinfo_sector; /* sector number of FAT32 fsinfo */ | 229 | unsigned long fsinfo_sector; /* sector number of FAT32 fsinfo */ |
229 | struct semaphore fat_lock; | 230 | struct mutex fat_lock; |
230 | unsigned int prev_free; /* previously allocated cluster number */ | 231 | unsigned int prev_free; /* previously allocated cluster number */ |
231 | unsigned int free_clusters; /* -1 if undefined */ | 232 | unsigned int free_clusters; /* -1 if undefined */ |
232 | struct fat_mount_options options; | 233 | struct fat_mount_options options; |