diff options
Diffstat (limited to 'fs/gfs2/dir.c')
-rw-r--r-- | fs/gfs2/dir.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index fe6c5adc5df0..eb68cdd41d48 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #include <linux/sort.h> | 61 | #include <linux/sort.h> |
62 | #include <linux/gfs2_ondisk.h> | 62 | #include <linux/gfs2_ondisk.h> |
63 | #include <linux/crc32.h> | 63 | #include <linux/crc32.h> |
64 | #include <linux/vmalloc.h> | ||
64 | #include <asm/semaphore.h> | 65 | #include <asm/semaphore.h> |
65 | 66 | ||
66 | #include "gfs2.h" | 67 | #include "gfs2.h" |
@@ -1290,7 +1291,7 @@ static int gfs2_dir_read_leaf(struct inode *inode, u64 *offset, void *opaque, | |||
1290 | return 0; | 1291 | return 0; |
1291 | 1292 | ||
1292 | error = -ENOMEM; | 1293 | error = -ENOMEM; |
1293 | larr = kmalloc((leaves + entries) * sizeof(void*), GFP_KERNEL); | 1294 | larr = vmalloc((leaves + entries) * sizeof(void*)); |
1294 | if (!larr) | 1295 | if (!larr) |
1295 | goto out; | 1296 | goto out; |
1296 | darr = (const struct gfs2_dirent **)(larr + leaves); | 1297 | darr = (const struct gfs2_dirent **)(larr + leaves); |
@@ -1323,7 +1324,7 @@ static int gfs2_dir_read_leaf(struct inode *inode, u64 *offset, void *opaque, | |||
1323 | out_kfree: | 1324 | out_kfree: |
1324 | for(i = 0; i < leaf; i++) | 1325 | for(i = 0; i < leaf; i++) |
1325 | brelse(larr[i]); | 1326 | brelse(larr[i]); |
1326 | kfree(larr); | 1327 | vfree(larr); |
1327 | out: | 1328 | out: |
1328 | return error; | 1329 | return error; |
1329 | } | 1330 | } |