diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-04-18 10:09:15 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-04-18 10:09:15 -0400 |
commit | fe1bdedc6c16adedc6fd3636185ea91596b1d6eb (patch) | |
tree | 4d68a40c1a2db670e71952003e5fb09a95123975 /fs/gfs2/ops_address.c | |
parent | 4d8012b60e0f0e0217e65f67da7d97276d1824e9 (diff) |
[GFS2] Use vmalloc() in dir code
When allocating memory to sort directory entries, use vmalloc()
rather than kmalloc() since for larger directories, the required
size can easily be graeter than the 128k maximum of kmalloc().
Also adding the first steps towards getting the AOP_TRUNCATED_PAGE
return code get in the glock code by flagging all places where we
request a glock and we are holding a page lock.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/ops_address.c')
-rw-r--r-- | fs/gfs2/ops_address.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c index 3fd8c6ec256c..005c2522a879 100644 --- a/fs/gfs2/ops_address.c +++ b/fs/gfs2/ops_address.c | |||
@@ -216,7 +216,7 @@ static int gfs2_readpage(struct file *file, struct page *page) | |||
216 | int error; | 216 | int error; |
217 | 217 | ||
218 | if (file != &gfs2_internal_file_sentinal) { | 218 | if (file != &gfs2_internal_file_sentinal) { |
219 | gfs2_holder_init(ip->i_gl, LM_ST_SHARED, GL_ATIME, &gh); | 219 | gfs2_holder_init(ip->i_gl, LM_ST_SHARED, GL_ATIME|GL_AOP, &gh); |
220 | error = gfs2_glock_nq_m_atime(1, &gh); | 220 | error = gfs2_glock_nq_m_atime(1, &gh); |
221 | if (error) | 221 | if (error) |
222 | goto out_unlock; | 222 | goto out_unlock; |
@@ -267,7 +267,7 @@ static int gfs2_prepare_write(struct file *file, struct page *page, | |||
267 | loff_t end = ((loff_t)page->index << PAGE_CACHE_SHIFT) + to; | 267 | loff_t end = ((loff_t)page->index << PAGE_CACHE_SHIFT) + to; |
268 | struct gfs2_alloc *al; | 268 | struct gfs2_alloc *al; |
269 | 269 | ||
270 | gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_ATIME, &ip->i_gh); | 270 | gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_ATIME|GL_AOP, &ip->i_gh); |
271 | error = gfs2_glock_nq_m_atime(1, &ip->i_gh); | 271 | error = gfs2_glock_nq_m_atime(1, &ip->i_gh); |
272 | if (error) | 272 | if (error) |
273 | goto out_uninit; | 273 | goto out_uninit; |