All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Thomas Gleixner <tglx@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	hch@lst.de, peterz@infradead.org, tglx@linutronix.de,
	viro@zeniv.linux.org.uk
Subject: [tip:core/locking] hfs: Convert tree_lock to mutex
Date: Tue, 12 Oct 2010 15:53:52 GMT	[thread overview]
Message-ID: <tip-4a9410355406c31695eab9daeba694d7d9714e9b@git.kernel.org> (raw)
In-Reply-To: <20100907125056.416332114@linutronix.de>

Commit-ID:  4a9410355406c31695eab9daeba694d7d9714e9b
Gitweb:     http://git.kernel.org/tip/4a9410355406c31695eab9daeba694d7d9714e9b
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Tue, 7 Sep 2010 14:33:08 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 12 Oct 2010 17:36:11 +0200

hfs: Convert tree_lock to mutex

tree_lock is used as mutex so make it a mutex.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Acked-by: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
LKML-Reference: <20100907125056.416332114@linutronix.de>

---
 fs/hfs/bfind.c |    4 ++--
 fs/hfs/btree.c |    2 +-
 fs/hfs/btree.h |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/hfs/bfind.c b/fs/hfs/bfind.c
index 4129cdb..571abe9 100644
--- a/fs/hfs/bfind.c
+++ b/fs/hfs/bfind.c
@@ -23,7 +23,7 @@ int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd)
 	fd->search_key = ptr;
 	fd->key = ptr + tree->max_key_len + 2;
 	dprint(DBG_BNODE_REFS, "find_init: %d (%p)\n", tree->cnid, __builtin_return_address(0));
-	down(&tree->tree_lock);
+	mutex_lock(&tree->tree_lock);
 	return 0;
 }
 
@@ -32,7 +32,7 @@ void hfs_find_exit(struct hfs_find_data *fd)
 	hfs_bnode_put(fd->bnode);
 	kfree(fd->search_key);
 	dprint(DBG_BNODE_REFS, "find_exit: %d (%p)\n", fd->tree->cnid, __builtin_return_address(0));
-	up(&fd->tree->tree_lock);
+	mutex_unlock(&fd->tree->tree_lock);
 	fd->tree = NULL;
 }
 
diff --git a/fs/hfs/btree.c b/fs/hfs/btree.c
index 38a0a99..3ebc437 100644
--- a/fs/hfs/btree.c
+++ b/fs/hfs/btree.c
@@ -27,7 +27,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke
 	if (!tree)
 		return NULL;
 
-	init_MUTEX(&tree->tree_lock);
+	mutex_init(&tree->tree_lock);
 	spin_lock_init(&tree->hash_lock);
 	/* Set the correct compare function */
 	tree->sb = sb;
diff --git a/fs/hfs/btree.h b/fs/hfs/btree.h
index cc51905..2a1d712 100644
--- a/fs/hfs/btree.h
+++ b/fs/hfs/btree.h
@@ -33,7 +33,7 @@ struct hfs_btree {
 	unsigned int depth;
 
 	//unsigned int map1_size, map_size;
-	struct semaphore tree_lock;
+	struct mutex tree_lock;
 
 	unsigned int pages_per_bnode;
 	spinlock_t hash_lock;

  reply	other threads:[~2010-10-12 15:54 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-07 14:31 [patch 00/30] semaphore cleanup Thomas Gleixner
2010-09-07 14:31 ` [patch 01/30] semaphore: Add DEFINE_SEMAPHORE Thomas Gleixner
2010-09-07 14:31 ` [patch 02/30] input: misc/hp_sdc_rtc: semaphore cleanup Thomas Gleixner
2010-09-08 15:37   ` Dmitry Torokhov
2010-10-12 15:49   ` [tip:core/locking] input: Misc/hp_sdc_rtc: " tip-bot for Thomas Gleixner
2010-09-07 14:32 ` [patch 03/30] input: serio/hil_mlc: " Thomas Gleixner
2010-10-12 15:49   ` [tip:core/locking] input: Serio/hil_mlc: " tip-bot for Thomas Gleixner
2010-09-07 14:32 ` [patch 04/30] input: serio/hp_sdc: " Thomas Gleixner
2010-10-12 15:49   ` [tip:core/locking] input: Serio/hp_sdc: " tip-bot for Thomas Gleixner
2010-09-07 14:32 ` [patch 05/30] net: 3c527: " Thomas Gleixner
2010-09-07 16:28   ` David Miller
2010-10-12 15:50   ` [tip:core/locking] " tip-bot for Thomas Gleixner
2010-09-07 14:32 ` [patch 06/30] hamradio: 6pack: " Thomas Gleixner
2010-09-07 16:28   ` David Miller
2010-10-12 15:50   ` [tip:core/locking] " tip-bot for Thomas Gleixner
2010-09-07 14:32 ` [patch 07/30] hamradio: mkiss: " Thomas Gleixner
2010-09-07 16:28   ` David Miller
2010-10-12 15:50   ` [tip:core/locking] hamradio: Mkiss: " tip-bot for Thomas Gleixner
2010-09-07 14:32 ` [patch 08/30] net: ppp_async: " Thomas Gleixner
2010-09-07 16:28   ` David Miller
2010-10-12 15:51   ` [tip:core/locking] net: Ppp_async: " tip-bot for Thomas Gleixner
2010-09-07 14:32 ` [patch 09/30] net: wan/cosa.c: Convert "mutex" to semaphore Thomas Gleixner
2010-09-07 16:29   ` David Miller
2010-10-12 15:51   ` [tip:core/locking] net: Wan/cosa.c: " tip-bot for Thomas Gleixner
2010-09-07 14:32 ` [patch 10/30] irda: semaphore cleanup Thomas Gleixner
2010-09-07 16:29   ` David Miller
2010-10-12 15:51   ` [tip:core/locking] irda: Semaphore cleanup tip-bot for Thomas Gleixner
2010-09-07 14:32 ` [patch 11/30] parport: semaphore cleanup Thomas Gleixner
2010-10-12 15:52   ` [tip:core/locking] parport: Semaphore cleanup tip-bot for Thomas Gleixner
2010-09-07 14:32 ` [patch 12/30] ibmphp-hpc: semaphore cleanup Thomas Gleixner
2010-09-09 20:42   ` Jesse Barnes
2010-09-07 14:32 ` [patch 13/30] usb: ftdi-elan: Convert "mutex" to semaphore Thomas Gleixner
2010-09-07 14:32 ` [patch 14/30] scsi: aacraid semaphore cleanup Thomas Gleixner
2010-09-07 14:32 ` [patch 15/30] smbfs: Convert server->sem to mutex Thomas Gleixner
2010-09-10 12:46   ` Jeff Layton
2010-09-07 14:32 ` [patch 16/30] hpfs: Convert sbi->hpfs_creation_de " Thomas Gleixner
2010-10-30  8:16   ` [tip:core/locking] " tip-bot for Thomas Gleixner
2010-09-07 14:33 ` [patch 17/30] hpfsplus: Convert tree_lock " Thomas Gleixner
2010-09-07 14:33 ` [patch 18/30] hfs: " Thomas Gleixner
2010-10-12 15:53   ` tip-bot for Thomas Gleixner [this message]
2010-09-07 14:33 ` [patch 19/30] affs: use sema_init instead of init_MUTEX Thomas Gleixner
2010-10-12 15:54   ` [tip:core/locking] affs: Use " tip-bot for Thomas Gleixner
2010-09-07 14:33 ` [patch 20/30] xfs: semaphore cleanup Thomas Gleixner
2010-09-07 14:33 ` [patch 21/30] mmc: Convert "mutex" to semaphore Thomas Gleixner
2010-09-14 12:47   ` Chris Ball
2010-09-07 14:33 ` [patch 22/30] dvb: " Thomas Gleixner
2010-09-07 14:33 ` [patch 23/30] infiniband: Make user_mad semaphore a real one Thomas Gleixner
2010-09-29  3:53   ` Roland Dreier
2010-09-07 14:33 ` [patch 24/30] ia64: salinfo: sema_init instead of init_MUTEX Thomas Gleixner
2010-09-07 14:33   ` Thomas Gleixner
2010-09-07 14:33 ` [patch 25/30] drivers/macintosh/adb: Do not claim that the semaphore is a mutex Thomas Gleixner
2010-10-12 15:52   ` [tip:core/locking] " tip-bot for Thomas Gleixner
2010-09-07 14:33 ` [patch 26/30] printk: Make console_sem a semaphore not a pseudo mutex Thomas Gleixner
2010-10-12 15:53   ` [tip:core/locking] " tip-bot for Thomas Gleixner
2010-09-07 14:33 ` [patch 27/30] staging: Bulk convert the semaphore mess Thomas Gleixner
2010-09-08  2:30   ` Greg KH
2010-09-08  8:59     ` Thomas Gleixner
2010-09-08  9:11       ` Greg KH
2010-09-13 18:45         ` Thomas Gleixner
2010-09-08  2:35   ` Greg KH
2010-10-30 10:16   ` [tip:core/locking] staging: Final semaphore cleanup tip-bot for Thomas Gleixner
2010-09-07 14:33 ` [patch 28/30] arm: bcmring: " Thomas Gleixner
2010-09-07 14:33   ` Thomas Gleixner
2010-10-12 15:53   ` [tip:core/locking] arm: Bcmring: " tip-bot for Thomas Gleixner
2010-09-07 14:33 ` [patch 29/30] hwmon: s3c-hwmon: Use a real mutex Thomas Gleixner
2010-09-07 14:33   ` [lm-sensors] " Thomas Gleixner
2010-09-08 13:39   ` Jean Delvare
2010-09-08 13:39     ` [lm-sensors] " Jean Delvare
2010-09-07 14:34 ` [patch 30/30] semaphore: Remove mutex emulation Thomas Gleixner
2010-10-30 10:16   ` [tip:core/locking] " tip-bot for Thomas Gleixner
2010-09-07 15:27 ` [patch 00/30] semaphore cleanup Arnd Bergmann
2010-09-07 15:38   ` Thomas Gleixner
2010-09-07 17:38     ` Arnd Bergmann
2010-09-07 20:23       ` Thomas Gleixner
2010-09-07 20:40         ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-4a9410355406c31695eab9daeba694d7d9714e9b@git.kernel.org \
    --to=tglx@linutronix.de \
    --cc=hch@lst.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.