[Patch RFC 24/37] xfs: semaphore cleanup

From: Thomas Gleixner
Date: Sun Jul 26 2009 - 04:24:40 EST


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@xxxxxxxxxxxxx>
Cc: Christoph Hellwig <hch@xxxxxx>
---
fs/xfs/linux-2.6/xfs_buf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6-tip/fs/xfs/linux-2.6/xfs_buf.c
===================================================================
--- linux-2.6-tip.orig/fs/xfs/linux-2.6/xfs_buf.c
+++ linux-2.6-tip/fs/xfs/linux-2.6/xfs_buf.c
@@ -263,7 +263,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 */
+ semaphore_init_locked(&bp->b_sema); /* held, no waiters */
XB_SET_OWNER(bp);
bp->b_target = target;
bp->b_file_offset = range_base;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/