diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-05-06 09:12:54 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-07-18 09:53:08 -0400 |
commit | 92ad8f37509a7d9d5dd6e0092211b092a7ca7fb1 (patch) | |
tree | 96c0f9c524b80e8d1d247e3f462c0c0d6fb782a5 /drivers/mtd/ubi/misc.c | |
parent | 79b510c0f21174f4bd055d1aab156e548ae3a5f2 (diff) |
UBI: use vmalloc for large buffers
UBI allocates temporary buffers of PEB size, which may be 256KiB.
Use vmalloc instead of kmalloc for such big temporary buffers.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/misc.c')
-rw-r--r-- | drivers/mtd/ubi/misc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/misc.c b/drivers/mtd/ubi/misc.c index 38d4e6757dc7..9e2338c8e2cf 100644 --- a/drivers/mtd/ubi/misc.c +++ b/drivers/mtd/ubi/misc.c | |||
@@ -67,7 +67,7 @@ int ubi_check_volume(struct ubi_device *ubi, int vol_id) | |||
67 | if (vol->vol_type != UBI_STATIC_VOLUME) | 67 | if (vol->vol_type != UBI_STATIC_VOLUME) |
68 | return 0; | 68 | return 0; |
69 | 69 | ||
70 | buf = kmalloc(vol->usable_leb_size, GFP_KERNEL); | 70 | buf = vmalloc(vol->usable_leb_size); |
71 | if (!buf) | 71 | if (!buf) |
72 | return -ENOMEM; | 72 | return -ENOMEM; |
73 | 73 | ||
@@ -87,7 +87,7 @@ int ubi_check_volume(struct ubi_device *ubi, int vol_id) | |||
87 | } | 87 | } |
88 | } | 88 | } |
89 | 89 | ||
90 | kfree(buf); | 90 | vfree(buf); |
91 | return err; | 91 | return err; |
92 | } | 92 | } |
93 | 93 | ||