Merge tag 'v3.10.65' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / mtd / ubi / upd.c
index 2a1b6e037e1a1ced496ac446ca07d6037ef61d0e..3fbe7efdc718e5875a1c53c3b34bb9d3ac4eb401 100644 (file)
@@ -193,7 +193,7 @@ int ubi_start_leb_change(struct ubi_device *ubi, struct ubi_volume *vol,
        vol->changing_leb = 1;
        vol->ch_lnum = req->lnum;
 
-       vol->upd_buf = vmalloc(req->bytes);
+       vol->upd_buf = kmalloc(req->bytes, GFP_KERNEL);
        if (!vol->upd_buf)
                return -ENOMEM;
 
@@ -370,7 +370,7 @@ int ubi_more_update_data(struct ubi_device *ubi, struct ubi_volume *vol,
                        return err;
                vol->updating = 0;
                err = to_write;
-               vfree(vol->upd_buf);
+               kfree(vol->upd_buf);
        }
 
        return err;
@@ -426,7 +426,7 @@ int ubi_more_leb_change_data(struct ubi_device *ubi, struct ubi_volume *vol,
        if (vol->upd_received == vol->upd_bytes) {
                vol->changing_leb = 0;
                err = count;
-               vfree(vol->upd_buf);
+               kfree(vol->upd_buf);
        }
 
        return err;