Skip to content

Commit

Permalink
[DLM] Fix spin lock already unlocked bug
Browse files Browse the repository at this point in the history
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 <pcaulfie@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
Patrick Caulfield authored and Steven Whitehouse committed Feb 5, 2007
1 parent 3fb4a25 commit 4edde74
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/dlm/lowcomms-tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4edde74

Please sign in to comment.