Commit f0ce0334 authored by Thomas Gleixner's avatar Thomas Gleixner

hpfs: Convert sbi->hpfs_creation_de to mutex

sbi->hpfs_creation_de is used as mutex so make it a mutex.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
parent 4904cd2a
...@@ -13,7 +13,7 @@ void hpfs_lock_creation(struct super_block *s) ...@@ -13,7 +13,7 @@ void hpfs_lock_creation(struct super_block *s)
#ifdef DEBUG_LOCKS #ifdef DEBUG_LOCKS
printk("lock creation\n"); printk("lock creation\n");
#endif #endif
down(&hpfs_sb(s)->hpfs_creation_de); mutex_lock(&hpfs_sb(s)->hpfs_creation_de);
} }
void hpfs_unlock_creation(struct super_block *s) void hpfs_unlock_creation(struct super_block *s)
...@@ -21,7 +21,7 @@ void hpfs_unlock_creation(struct super_block *s) ...@@ -21,7 +21,7 @@ void hpfs_unlock_creation(struct super_block *s)
#ifdef DEBUG_LOCKS #ifdef DEBUG_LOCKS
printk("unlock creation\n"); printk("unlock creation\n");
#endif #endif
up(&hpfs_sb(s)->hpfs_creation_de); mutex_unlock(&hpfs_sb(s)->hpfs_creation_de);
} }
/* Map a sector into a buffer and return pointers to it and to the buffer. */ /* Map a sector into a buffer and return pointers to it and to the buffer. */
......
...@@ -87,7 +87,7 @@ struct hpfs_sb_info { ...@@ -87,7 +87,7 @@ struct hpfs_sb_info {
unsigned *sb_bmp_dir; /* main bitmap directory */ unsigned *sb_bmp_dir; /* main bitmap directory */
unsigned sb_c_bitmap; /* current bitmap */ unsigned sb_c_bitmap; /* current bitmap */
unsigned sb_max_fwd_alloc; /* max forwad allocation */ unsigned sb_max_fwd_alloc; /* max forwad allocation */
struct semaphore hpfs_creation_de; /* when creating dirents, nobody else struct mutex hpfs_creation_de; /* when creating dirents, nobody else
can alloc blocks */ can alloc blocks */
/*unsigned sb_mounting : 1;*/ /*unsigned sb_mounting : 1;*/
int sb_timeshift; int sb_timeshift;
......
...@@ -487,7 +487,7 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent) ...@@ -487,7 +487,7 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent)
sbi->sb_bmp_dir = NULL; sbi->sb_bmp_dir = NULL;
sbi->sb_cp_table = NULL; sbi->sb_cp_table = NULL;
init_MUTEX(&sbi->hpfs_creation_de); mutex_init(&sbi->hpfs_creation_de);
uid = current_uid(); uid = current_uid();
gid = current_gid(); gid = current_gid();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment