lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 30 Oct 2010 08:16:01 GMT From: tip-bot for Thomas Gleixner <tglx@...utronix.de> To: linux-tip-commits@...r.kernel.org Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com, peterz@...radead.org, tglx@...utronix.de, viro@...iv.linux.org.uk, hch@...radead.org Subject: [tip:core/locking] hpfs: Convert sbi->hpfs_creation_de to mutex Commit-ID: 117bf5fbdbdc7a5394e5718b3354238961c83067 Gitweb: http://git.kernel.org/tip/117bf5fbdbdc7a5394e5718b3354238961c83067 Author: Thomas Gleixner <tglx@...utronix.de> AuthorDate: Tue, 7 Sep 2010 14:32:56 +0000 Committer: Thomas Gleixner <tglx@...utronix.de> CommitDate: Sat, 30 Oct 2010 10:12:03 +0200 hpfs: Convert sbi->hpfs_creation_de to mutex sbi->hpfs_creation_de is used as mutex so make it a mutex. Signed-off-by: Thomas Gleixner <tglx@...utronix.de> Acked-by: Christoph Hellwig <hch@...radead.org> Cc: Peter Zijlstra <peterz@...radead.org> Cc: Al Viro <viro@...iv.linux.org.uk> Cc: linux-fsdevel@...r.kernel.org LKML-Reference: <20100907125056.228874895@...utronix.de> --- fs/hpfs/buffer.c | 4 ++-- fs/hpfs/hpfs_fn.h | 2 +- fs/hpfs/super.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/hpfs/buffer.c b/fs/hpfs/buffer.c index eac5f96..793cb9d 100644 --- a/fs/hpfs/buffer.c +++ b/fs/hpfs/buffer.c @@ -14,7 +14,7 @@ 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) @@ -22,7 +22,7 @@ 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. */ diff --git a/fs/hpfs/hpfs_fn.h b/fs/hpfs/hpfs_fn.h index b59eac0..2fee17d 100644 --- a/fs/hpfs/hpfs_fn.h +++ b/fs/hpfs/hpfs_fn.h @@ -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; diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c index c969a1a..18e1d45 100644 --- a/fs/hpfs/super.c +++ b/fs/hpfs/super.c @@ -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(); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists