diff options
Diffstat (limited to 'fs/dlm')
-rw-r--r-- | 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 18b91c65bdb3..ce5e7cdfb45d 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, | |||
709 | if (!con) | 709 | if (!con) |
710 | return NULL; | 710 | return NULL; |
711 | 711 | ||
712 | spin_lock(&con->writequeue_lock); | ||
712 | e = list_entry(con->writequeue.prev, struct writequeue_entry, list); | 713 | e = list_entry(con->writequeue.prev, struct writequeue_entry, list); |
713 | if ((&e->list == &con->writequeue) || | 714 | if ((&e->list == &con->writequeue) || |
714 | (PAGE_CACHE_SIZE - e->end < len)) { | 715 | (PAGE_CACHE_SIZE - e->end < len)) { |
@@ -747,6 +748,7 @@ void dlm_lowcomms_commit_buffer(void *mh) | |||
747 | struct connection *con = e->con; | 748 | struct connection *con = e->con; |
748 | int users; | 749 | int users; |
749 | 750 | ||
751 | spin_lock(&con->writequeue_lock); | ||
750 | users = --e->users; | 752 | users = --e->users; |
751 | if (users) | 753 | if (users) |
752 | goto out; | 754 | goto out; |