Skip to content

Commit

Permalink
hpfs: Convert sbi->hpfs_creation_de to mutex
Browse files Browse the repository at this point in the history
sbi->hpfs_creation_de is used as mutex so make it a mutex.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Christoph Hellwig <hch@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
LKML-Reference: <20100907125056.228874895@linutronix.de>
  • Loading branch information
Thomas Gleixner committed Oct 30, 2010
1 parent 18cb657 commit 117bf5f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions fs/hpfs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ void hpfs_lock_creation(struct super_block *s)
#ifdef DEBUG_LOCKS
printk("lock creation\n");
#endif
down(&hpfs_sb(s)->hpfs_creation_de);
mutex_lock(&hpfs_sb(s)->hpfs_creation_de);
}

void hpfs_unlock_creation(struct super_block *s)
{
#ifdef DEBUG_LOCKS
printk("unlock creation\n");
#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. */
Expand Down
2 changes: 1 addition & 1 deletion fs/hpfs/hpfs_fn.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ struct hpfs_sb_info {
unsigned *sb_bmp_dir; /* main bitmap directory */
unsigned sb_c_bitmap; /* current bitmap */
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 */
/*unsigned sb_mounting : 1;*/
int sb_timeshift;
Expand Down
2 changes: 1 addition & 1 deletion fs/hpfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent)
sbi->sb_bmp_dir = NULL;
sbi->sb_cp_table = NULL;

init_MUTEX(&sbi->hpfs_creation_de);
mutex_init(&sbi->hpfs_creation_de);

uid = current_uid();
gid = current_gid();
Expand Down

0 comments on commit 117bf5f

Please sign in to comment.