瀏覽代碼

[DLM] move kmap to after spin_unlock

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>
David Teigland 19 年之前
父節點
當前提交
fcc8abc8d4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/dlm/lowcomms.c

+ 1 - 1
fs/dlm/lowcomms.c

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