Merge 3.8-rc5 into staging-next
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Jan 2013 05:25:02 +0000 (21:25 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Jan 2013 05:25:02 +0000 (21:25 -0800)
This resolves a merge issue with a iio driver, and the zram code.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16 files changed:
1  2 
MAINTAINERS
drivers/iio/accel/hid-sensor-accel-3d.c
drivers/iio/adc/lp8788_adc.c
drivers/iio/adc/max1363.c
drivers/iio/gyro/hid-sensor-gyro-3d.c
drivers/iio/light/hid-sensor-als.c
drivers/iio/magnetometer/hid-sensor-magn-3d.c
drivers/rtc/Kconfig
drivers/rtc/Makefile
drivers/staging/iio/adc/mxs-lradc.c
drivers/staging/omapdrm/omap_gem_dmabuf.c
drivers/staging/sb105x/sb_pci_mp.c
drivers/staging/vt6656/bssdb.h
drivers/staging/vt6656/int.h
drivers/staging/wlan-ng/prism2mgmt.c
drivers/staging/zram/zram_drv.c

diff --cc MAINTAINERS
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 6762b994f6f4b70403b262fd31e9e7aa99e95e1f,f2a73bd739fb94b750e66e1ee2c931e3c971a52a..77a3f0dfba770821ebe8aef3ce3229bfa1163078
@@@ -291,17 -300,19 +289,20 @@@ static int zram_bvec_write(struct zram 
  
        user_mem = kmap_atomic(page);
  
-       if (is_partial_io(bvec))
+       if (is_partial_io(bvec)) {
                memcpy(uncmem + offset, user_mem + bvec->bv_offset,
                       bvec->bv_len);
-       else
+               kunmap_atomic(user_mem);
+               user_mem = NULL;
+       } else {
                uncmem = user_mem;
+       }
  
        if (page_zero_filled(uncmem)) {
 -              if (!is_partial_io(bvec))
 -                      kunmap_atomic(user_mem);
 -              zram_stat_inc(&zram->stats.pages_zero);
 +              kunmap_atomic(user_mem);
 +              if (is_partial_io(bvec))
 +                      kfree(uncmem);
 +              zram->stats.pages_zero++;
                zram_set_flag(zram, index, ZRAM_ZERO);
                ret = 0;
                goto out;
        }
  
        if (unlikely(clen > max_zpage_size)) {
 -              zram_stat_inc(&zram->stats.bad_compress);
 +              zram->stats.bad_compress++;
-               src = uncmem;
                clen = PAGE_SIZE;
+               src = NULL;
+               if (is_partial_io(bvec))
+                       src = uncmem;
        }
  
        handle = zs_malloc(zram->mem_pool, clen);
  
        /* Update stats */
        zram_stat64_add(zram, &zram->stats.compr_size, clen);
 -      zram_stat_inc(&zram->stats.pages_stored);
 +      zram->stats.pages_stored++;
        if (clen <= PAGE_SIZE / 2)
 -              zram_stat_inc(&zram->stats.good_compress);
 +              zram->stats.good_compress++;
  
-       return 0;
  out:
+       if (is_partial_io(bvec))
+               kfree(uncmem);
        if (ret)
                zram_stat64_inc(zram, &zram->stats.failed_writes);
        return ret;