Merge branch 'stable-3.2' into pandora-3.2
authorGrazvydas Ignotas <notasas@gmail.com>
Sun, 23 Oct 2016 19:10:54 +0000 (22:10 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 23 Oct 2016 19:10:54 +0000 (22:10 +0300)
1  2 
arch/arm/kernel/ptrace.c
drivers/mmc/core/mmc.c
drivers/mtd/ubi/eba.c
fs/ubifs/file.c
include/linux/mm.h
kernel/exit.c
kernel/sched.c
mm/memory.c

Simple merge
Simple merge
@@@ -521,14 -523,10 +522,10 @@@ retry
                goto out_put;
        }
  
-       vid_hdr->sqnum = cpu_to_be64(next_sqnum(ubi));
-       err = ubi_io_write_vid_hdr(ubi, new_pnum, vid_hdr);
-       if (err)
-               goto write_error;
+       ubi_assert(vid_hdr->vol_type == UBI_VID_DYNAMIC);
  
-       data_size = offset + len;
        mutex_lock(&ubi->buf_mutex);
 -      memset(ubi->peb_buf1 + offset, 0xFF, len);
 +      memset(ubi->peb_buf + offset, 0xFF, len);
  
        /* Read everything before the area where the write failure happened */
        if (offset > 0) {
                        goto out_unlock;
        }
  
 -      memcpy(ubi->peb_buf1 + offset, buf, len);
 +      memcpy(ubi->peb_buf + offset, buf, len);
  
 -      crc = crc32(UBI_CRC32_INIT, ubi->peb_buf1, data_size);
+       data_size = offset + len;
 -      err = ubi_io_write_data(ubi, ubi->peb_buf1, new_pnum, 0, data_size);
++      crc = crc32(UBI_CRC32_INIT, ubi->peb_buf, data_size);
+       vid_hdr->sqnum = cpu_to_be64(next_sqnum(ubi));
+       vid_hdr->copy_flag = 1;
+       vid_hdr->data_size = cpu_to_be32(data_size);
+       vid_hdr->data_crc = cpu_to_be32(crc);
+       err = ubi_io_write_vid_hdr(ubi, new_pnum, vid_hdr);
+       if (err) {
+               mutex_unlock(&ubi->buf_mutex);
+               goto write_error;
+       }
 +      err = ubi_io_write_data(ubi, ubi->peb_buf, new_pnum, 0, data_size);
        if (err) {
                mutex_unlock(&ubi->buf_mutex);
                goto write_error;
diff --cc fs/ubifs/file.c
Simple merge
Simple merge
diff --cc kernel/exit.c
Simple merge
diff --cc kernel/sched.c
Simple merge
diff --cc mm/memory.c
Simple merge