diff options
author | Arjan van de Ven <arjan@infradead.org> | 2006-03-23 06:00:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 10:38:15 -0500 |
commit | 6b9438e1323a2be10dcc039f6321e7ca18b9459e (patch) | |
tree | 9d84b6f39a2a586c14b2932eda5817cae8ce5b57 /fs/fat | |
parent | f82945dff51ff7b33f69cb45a8342b936e966f7f (diff) |
[PATCH] fat_lock is used as a mutex, convert it to using the new mutex primitive
The fat code uses the fat_lock always in a mutex way (taking and releasing
the lock in the same function), the patch below converts it into the new
mutex primitive. Please consider this patch for the code.
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/fat')
-rw-r--r-- | fs/fat/fatent.c | 6 |
1 files changed, 3 insertions, 3 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: |