Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git] / drivers / mtd / ubi / upd.c
index 16d0b20..88a85c7 100644 (file)
@@ -150,7 +150,7 @@ int ubi_start_update(struct ubi_device *ubi, struct ubi_volume *vol,
                        return err;
        }
 
-       err = ubi_wl_flush(ubi);
+       err = ubi_wl_flush(ubi, UBI_ALL, UBI_ALL);
        if (err)
                return err;
 
@@ -188,14 +188,12 @@ int ubi_start_leb_change(struct ubi_device *ubi, struct ubi_volume *vol,
        dbg_gen("start changing LEB %d:%d, %u bytes",
                vol->vol_id, req->lnum, req->bytes);
        if (req->bytes == 0)
-               return ubi_eba_atomic_leb_change(ubi, vol, req->lnum, NULL, 0,
-                                                req->dtype);
+               return ubi_eba_atomic_leb_change(ubi, vol, req->lnum, NULL, 0);
 
        vol->upd_bytes = req->bytes;
        vol->upd_received = 0;
        vol->changing_leb = 1;
        vol->ch_lnum = req->lnum;
-       vol->ch_dtype = req->dtype;
 
        vol->upd_buf = vmalloc(ALIGN((int)req->bytes, ubi->min_io_size));
        if (!vol->upd_buf)
@@ -248,8 +246,7 @@ static int write_leb(struct ubi_device *ubi, struct ubi_volume *vol, int lnum,
                        return 0;
                }
 
-               err = ubi_eba_write_leb(ubi, vol, lnum, buf, 0, len,
-                                       UBI_UNKNOWN);
+               err = ubi_eba_write_leb(ubi, vol, lnum, buf, 0, len);
        } else {
                /*
                 * When writing static volume, and this is the last logical
@@ -261,8 +258,7 @@ static int write_leb(struct ubi_device *ubi, struct ubi_volume *vol, int lnum,
                 * contain zeros, not random trash.
                 */
                memset(buf + len, 0, vol->usable_leb_size - len);
-               err = ubi_eba_write_leb_st(ubi, vol, lnum, buf, len,
-                                          UBI_UNKNOWN, used_ebs);
+               err = ubi_eba_write_leb_st(ubi, vol, lnum, buf, len, used_ebs);
        }
 
        return err;
@@ -367,7 +363,7 @@ int ubi_more_update_data(struct ubi_device *ubi, struct ubi_volume *vol,
 
        ubi_assert(vol->upd_received <= vol->upd_bytes);
        if (vol->upd_received == vol->upd_bytes) {
-               err = ubi_wl_flush(ubi);
+               err = ubi_wl_flush(ubi, UBI_ALL, UBI_ALL);
                if (err)
                        return err;
                /* The update is finished, clear the update marker */
@@ -423,7 +419,7 @@ int ubi_more_leb_change_data(struct ubi_device *ubi, struct ubi_volume *vol,
                       len - vol->upd_bytes);
                len = ubi_calc_data_len(ubi, vol->upd_buf, len);
                err = ubi_eba_atomic_leb_change(ubi, vol, vol->ch_lnum,
-                                               vol->upd_buf, len, UBI_UNKNOWN);
+                                               vol->upd_buf, len);
                if (err)
                        return err;
        }