Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4edde74eedb8bc4c03adc3602b114b72a7ccd13f
Commit:     4edde74eedb8bc4c03adc3602b114b72a7ccd13f
Parent:     3fb4a251febe70e4c65ea8250545b391fd414d5a
Author:     Patrick Caulfield <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 2 17:08:54 2007 +0000
Committer:  Steven Whitehouse <[EMAIL PROTECTED]>
CommitDate: Mon Feb 5 13:36:21 2007 -0500

    [DLM] Fix spin lock already unlocked bug
    
    I just noticed this message when testing some other changes I'd made to
    lowcomms (to use workqueues) but the problem seems to be in the current
    git trees too. I'm amazed no-one has seen it.
    
        BUG: spinlock already unlocked on CPU#1, dlm_recoverd/16868
    
    Signed-Off-By: Patrick Caulfield <[EMAIL PROTECTED]>
    Signed-off-by: Steven Whitehouse <[EMAIL PROTECTED]>
---
 fs/dlm/lowcomms-tcp.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/dlm/lowcomms-tcp.c b/fs/dlm/lowcomms-tcp.c
index 18b91c6..ce5e7cd 100644
--- a/fs/dlm/lowcomms-tcp.c
+++ b/fs/dlm/lowcomms-tcp.c
@@ -709,6 +709,7 @@ void *dlm_lowcomms_get_buffer(int nodeid, int len,
        if (!con)
                return NULL;
 
+       spin_lock(&con->writequeue_lock);
        e = list_entry(con->writequeue.prev, struct writequeue_entry, list);
        if ((&e->list == &con->writequeue) ||
            (PAGE_CACHE_SIZE - e->end < len)) {
@@ -747,6 +748,7 @@ void dlm_lowcomms_commit_buffer(void *mh)
        struct connection *con = e->con;
        int users;
 
+       spin_lock(&con->writequeue_lock);
        users = --e->users;
        if (users)
                goto out;
-
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