]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[DLM] move kmap to after spin_unlock
authorDavid Teigland <teigland@redhat.com>
Thu, 10 Aug 2006 18:31:23 +0000 (13:31 -0500)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 11 Aug 2006 13:44:00 +0000 (09:44 -0400)
Doing the kmap() while holding the spinlock was causing recursive spinlock
problems.  It seems the kmap was scheduling, although there was no warning
as I'd expect.  Patrick, do we need locking around the kmap?

Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/dlm/lowcomms.c

index 7ab40422ab578138b1509e5e1729cd40dab5f9d7..23f5ce12080b0e2f0d48b03ff844c78c5932113a 100644 (file)
@@ -934,11 +934,11 @@ static int send_to_sock(struct nodeinfo *ni)
                        break;
                e = list_entry(ni->writequeue.next, struct writequeue_entry,
                               list);
-               kmap(e->page);
                len = e->len;
                offset = e->offset;
                BUG_ON(len == 0 && e->users == 0);
                spin_unlock(&ni->writequeue_lock);
+               kmap(e->page);
 
                ret = 0;
                if (len) {