Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: a9b72c1a181c640f1a469eeb13fe479fc9758cc9
Parent: db5c670bfecfeb3cdf748651181e7e82438e601d
Author: Abhijith Das <adas(a)redhat.com>
AuthorDate: Tue Sep 22 09:54:41 2009 -0500
Committer: Abhijith Das <adas(a)redhat.com>
CommitterDate: Tue Sep 22 09:54:41 2009 -0500
gfs-kernel: bz245264 - gfs_tool: page allocation failure. order:4, mode:0xd0
This patch changes the allocation in gi_skeleton from kmalloc to vmalloc.
Allows for larger buffers to be allocated without tripping page allocation
failures.
---
gfs-kernel/src/gfs/ioctl.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/gfs-kernel/src/gfs/ioctl.c b/gfs-kernel/src/gfs/ioctl.c
index d73926a..588bf89 100644
--- a/gfs-kernel/src/gfs/ioctl.c
+++ b/gfs-kernel/src/gfs/ioctl.c
@@ -20,6 +20,7 @@
#include <linux/buffer_head.h>
#include <asm/uaccess.h>
#include <linux/gfs_ioctl.h>
+#include <linux/vmalloc.h>
#include "gfs.h"
#include "bmap.h"
@@ -66,7 +67,7 @@ gi_skeleton(struct gfs_inode *ip, struct gfs_ioctl *gi,
if (size > gi->gi_size)
size = gi->gi_size;
- buf = kmalloc(size, GFP_KERNEL);
+ buf = vmalloc(size);
if (!buf)
return -ENOMEM;
@@ -80,7 +81,7 @@ gi_skeleton(struct gfs_inode *ip, struct gfs_ioctl *gi,
error = count + 1;
out:
- kfree(buf);
+ vfree(buf);
return error;
}