aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm/dlmdomain.c
diff options
context:
space:
mode:
authorJoel Becker <Joel.Becker@oracle.com>2006-03-16 20:40:37 -0500
committerMark Fasheh <mark.fasheh@oracle.com>2006-06-26 17:42:42 -0400
commitc8f33b6e86af74ee7b800f57cac7b3c8559318fe (patch)
tree8806647e8f7a6525539d0a7ecdbe8f375b8f91a3 /fs/ocfs2/dlm/dlmdomain.c
parent03d864c02c3ea803b1718940ac6953a257182d7a (diff)
[PATCH] ocfs2: Alloc at least a page for the DLM hash
The OCFS2 DLM allocates a number of pages for a hash to lookup locks. There was a bug where a PAGE_SIZE bigger than the hash size (eg, 64K pages) would result in zero pages allocated. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/dlm/dlmdomain.c')
-rw-r--r--fs/ocfs2/dlm/dlmdomain.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c
index 80b8cce9cf3c..a074ec6f193f 100644
--- a/fs/ocfs2/dlm/dlmdomain.c
+++ b/fs/ocfs2/dlm/dlmdomain.c
@@ -67,6 +67,9 @@ static void **dlm_alloc_pagevec(int pages)
67 for (i = 0; i < pages; i++) 67 for (i = 0; i < pages; i++)
68 if (!(vec[i] = (void *)__get_free_page(GFP_KERNEL))) 68 if (!(vec[i] = (void *)__get_free_page(GFP_KERNEL)))
69 goto out_free; 69 goto out_free;
70
71 mlog(0, "Allocated DLM hash pagevec; %d pages (%lu expected), %Zd buckets per page\n",
72 pages, DLM_HASH_PAGES, DLM_BUCKETS_PER_PAGE);
70 return vec; 73 return vec;
71out_free: 74out_free:
72 dlm_free_pagevec(vec, i); 75 dlm_free_pagevec(vec, i);