Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8c8b8859b64baf6d7c33900e8720c7bafe775b2c
Commit:     8c8b8859b64baf6d7c33900e8720c7bafe775b2c
Parent:     fa20efd2fcd9349770113c6f72fc76ce437b62f5
Author:     Daniel Walker <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 30 13:31:17 2008 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 13:31:17 2008 +0100

    mcheck mce_64: mce_read_sem to mutex
    
    Converted to a mutex, and changed the name to mce_read_mutex.
    
    Signed-off-by: Daniel Walker <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 arch/x86/kernel/cpu/mcheck/mce_64.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c 
b/arch/x86/kernel/cpu/mcheck/mce_64.c
index 0adad77..8cd47fe 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_64.c
@@ -564,7 +564,7 @@ static ssize_t mce_read(struct file *filp, char __user 
*ubuf, size_t usize,
                        loff_t *off)
 {
        unsigned long *cpu_tsc;
-       static DECLARE_MUTEX(mce_read_sem);
+       static DEFINE_MUTEX(mce_read_mutex);
        unsigned next;
        char __user *buf = ubuf;
        int i, err;
@@ -573,12 +573,12 @@ static ssize_t mce_read(struct file *filp, char __user 
*ubuf, size_t usize,
        if (!cpu_tsc)
                return -ENOMEM;
 
-       down(&mce_read_sem);
+       mutex_lock(&mce_read_mutex);
        next = rcu_dereference(mcelog.next);
 
        /* Only supports full reads right now */
        if (*off != 0 || usize < MCE_LOG_LEN*sizeof(struct mce)) {
-               up(&mce_read_sem);
+               mutex_unlock(&mce_read_mutex);
                kfree(cpu_tsc);
                return -EINVAL;
        }
@@ -621,7 +621,7 @@ static ssize_t mce_read(struct file *filp, char __user 
*ubuf, size_t usize,
                        memset(&mcelog.entry[i], 0, sizeof(struct mce));
                }
        }
-       up(&mce_read_sem);
+       mutex_unlock(&mce_read_mutex);
        kfree(cpu_tsc);
        return err ? -EFAULT : buf - ubuf;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to