| From c5afd9e2f7eb81a77d19cea263528d42d8ea171e Mon Sep 17 00:00:00 2001 |
| From: Thomas Gleixner <tglx@linutronix.de> |
| Date: Sun, 26 Jul 2009 00:55:00 +0200 |
| Subject: [PATCH] xfs: semaphore cleanup |
| |
| commit 13a12e586373a8dd7a078d07921044f84f6e2601 in tip. |
| |
| bp->b_sema claims to be a mutex, but it is a semaphore with non |
| obvious semantics. Make it a real semaphore. |
| |
| Signed-off-by: Thomas Gleixner <tglx@linutronix.de> |
| Cc: Christoph Hellwig <hch@lst.de> |
| |
| diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c |
| index 77b8be8..ddd2fc2 100644 |
| --- a/fs/xfs/linux-2.6/xfs_buf.c |
| +++ b/fs/xfs/linux-2.6/xfs_buf.c |
| @@ -236,7 +236,7 @@ _xfs_buf_initialize( |
| init_completion(&bp->b_iowait); |
| INIT_LIST_HEAD(&bp->b_list); |
| INIT_LIST_HEAD(&bp->b_hash_list); |
| - init_MUTEX_LOCKED(&bp->b_sema); /* held, no waiters */ |
| + sema_init(&bp->b_sema, 0); /* held, no waiters */ |
| XB_SET_OWNER(bp); |
| bp->b_target = target; |
| bp->b_file_offset = range_base; |
| -- |
| 1.7.1.1 |
| |